From b42ecbff36d0f8671b91c07b7ae47faed3928f88 Mon Sep 17 00:00:00 2001 From: hashicc <191911133+hashicc@users.noreply.github.com> Date: Tue, 12 Aug 2025 15:08:35 -0700 Subject: [PATCH] Add api client for playwright e2e tests (#2901) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: 🤖 add @openapitools/openapi-generator-cli * chore: 🤖 Add @nestjs/core and @openapitools/openapi-generator-cli to ignoredBuiltDependencies These packages use postinstall for a opencollective notice * chore: 🤖 add package.json scripts for open-api client gen * chore: 🤖 add openapi generated files * chore: 🤖 add boundary api client fixture * chore: 🤖 incorporate api client fixture with base fixture * chore: 🤖 migrate existing test to use boundary api fixture * refactor: 💡 remove org cleanup from test * refactor: 💡 update sorting e2e test to use api client * refactor: 💡 clean up api client resource clean up logging * docs: ✏️ update jsdoc links for domain clients * chore: 🤖 avoid adding copywright headers to generated api * Add missing copyright headers * chore: 🤖 remove fetch argument from api client class The hope was to use request.fetch but playwright's fetch is a non-standard fetch which causes the generated api client to fail when using .clone() on the response * chore: 🤖 add optional OPENAPI_SWAGGER_URL_OR_FILE for openapi-client generation The OPENAPI_SWAGGER_URL_OR_FILE env var can be used to specify the -i flag the generate:api-client script with either: * a relative path * an absolute path * a url like: https://raw.githubusercontent.com/hashicorp/boundary/refs/heads/main/internal/gen/controller.swagger.json * refactor: 💡 clean up and refactor boundary-api-client fixture * chore: 🤖 add extra doc links and delete methods * test: 💍 add test to ensure that api-client fixture works * test: 💍 update existing e2e test examples with api-client * docs: ✏️ add comment for api-client e2e test * docs: ✏️ add additional links to service docs for api clients * refactor: 💡 cleanup api-client and corresponding test * docs: ✏️ add api client fixture docs to e2e README * fix: 🐛 fix regex * remove unnecessary capture group * add "-" to regex to allow for url segments like "storage-buckets" in "/v1/storage-buckets" * docs: ✏️ comment potential edge case in e2e api client cleanup * docs: ✏️ fix comment typo Co-authored-by: Zhihe Li * docs: ✏️ remove auth flag for generating e2e client * docs: ✏️ add mention that java is required for generate:api * chore: 🤖 implement pr feedback * chore: 🤖 Clean up api client and add more extensive test * chore: 🤖 fix casing in api-client test Co-authored-by: Zhihe Li --------- Co-authored-by: Zhihe Li --- .copywrite.hcl | 5 +- e2e-tests/README.md | 82 ++ e2e-tests/admin/tests/api-client.spec.js | 366 +++++++++ e2e-tests/admin/tests/pagination.spec.js | 297 +++---- e2e-tests/admin/tests/sorting.spec.js | 67 +- .../api-client/.openapi-generator-ignore | 23 + e2e-tests/api-client/.openapi-generator/FILES | 249 ++++++ .../api-client/.openapi-generator/VERSION | 1 + .../api-client/apis/AccountServiceApi.ts | 377 +++++++++ e2e-tests/api-client/apis/AliasServiceApi.ts | 272 +++++++ .../api-client/apis/AuthMethodServiceApi.ts | 385 +++++++++ .../api-client/apis/AuthTokenServiceApi.ts | 176 ++++ .../api-client/apis/BillingServiceApi.ts | 76 ++ .../apis/CredentialLibraryServiceApi.ts | 267 ++++++ .../api-client/apis/CredentialServiceApi.ts | 267 ++++++ .../apis/CredentialStoreServiceApi.ts | 272 +++++++ e2e-tests/api-client/apis/GroupServiceApi.ts | 437 ++++++++++ .../api-client/apis/HostCatalogServiceApi.ts | 277 +++++++ e2e-tests/api-client/apis/HostServiceApi.ts | 267 ++++++ .../api-client/apis/HostSetServiceApi.ts | 432 ++++++++++ .../api-client/apis/ManagedGroupServiceApi.ts | 267 ++++++ e2e-tests/api-client/apis/PolicyServiceApi.ts | 272 +++++++ e2e-tests/api-client/apis/RoleServiceApi.ts | 767 ++++++++++++++++++ e2e-tests/api-client/apis/ScopeServiceApi.ts | 577 +++++++++++++ .../apis/SessionRecordingServiceApi.ts | 258 ++++++ .../api-client/apis/SessionServiceApi.ts | 195 +++++ .../apis/StorageBucketServiceApi.ts | 277 +++++++ e2e-tests/api-client/apis/TargetServiceApi.ts | 660 +++++++++++++++ e2e-tests/api-client/apis/UserServiceApi.ts | 491 +++++++++++ e2e-tests/api-client/apis/WorkerServiceApi.ts | 550 +++++++++++++ e2e-tests/api-client/apis/index.ts | 24 + e2e-tests/api-client/index.ts | 5 + ...ControllerApiResourcesAccountsV1Account.ts | 187 +++++ .../ControllerApiResourcesAliasesV1Alias.ts | 175 ++++ ...llerApiResourcesAuthmethodsV1AuthMethod.ts | 218 +++++ ...rollerApiResourcesAuthtokensV1AuthToken.ts | 151 ++++ ...trollerApiResourcesBillingV1ActiveUsers.ts | 78 ++ ...sCredentiallibrariesV1CredentialLibrary.ts | 166 ++++ ...llerApiResourcesCredentialsV1Credential.ts | 150 ++++ ...ourcesCredentialstoresV1CredentialStore.ts | 157 ++++ .../ControllerApiResourcesGroupsV1Group.ts | 155 ++++ .../ControllerApiResourcesGroupsV1Member.ts | 71 ++ ...erApiResourcesHostcatalogsV1HostCatalog.ts | 203 +++++ .../ControllerApiResourcesHostsV1Host.ts | 200 +++++ ...ControllerApiResourcesHostsetsV1HostSet.ts | 198 +++++ ...ApiResourcesManagedgroupsV1ManagedGroup.ts | 157 ++++ ...ntrollerApiResourcesPluginsV1PluginInfo.ts | 78 ++ .../ControllerApiResourcesPoliciesV1Policy.ts | 152 ++++ .../ControllerApiResourcesRolesV1Grant.ts | 87 ++ .../ControllerApiResourcesRolesV1GrantJson.ts | 86 ++ .../ControllerApiResourcesRolesV1Principal.ts | 78 ++ .../ControllerApiResourcesRolesV1Role.ts | 189 +++++ .../ControllerApiResourcesScopesV1Key.ts | 120 +++ ...ontrollerApiResourcesScopesV1KeyVersion.ts | 81 ++ ...sourcesScopesV1KeyVersionDestructionJob.ts | 114 +++ .../ControllerApiResourcesScopesV1Scope.ts | 164 ++++ ...ControllerApiResourcesScopesV1ScopeInfo.ts | 92 +++ ...rcesSessionrecordingsV1ChannelRecording.ts | 132 +++ ...sSessionrecordingsV1ConnectionRecording.ts | 150 ++++ ...iResourcesSessionrecordingsV1Credential.ts | 121 +++ ...cesSessionrecordingsV1CredentialLibrary.ts | 121 +++ ...urcesSessionrecordingsV1CredentialStore.ts | 105 +++ ...llerApiResourcesSessionrecordingsV1Host.ts | 129 +++ ...ResourcesSessionrecordingsV1HostCatalog.ts | 122 +++ ...rcesSessionrecordingsV1SessionRecording.ts | 256 ++++++ ...erApiResourcesSessionrecordingsV1Target.ts | 153 ++++ ...llerApiResourcesSessionrecordingsV1User.ts | 97 +++ ...esourcesSessionrecordingsV1ValuesAtTime.ts | 134 +++ ...trollerApiResourcesSessionsV1Connection.ts | 113 +++ ...ControllerApiResourcesSessionsV1Session.ts | 221 +++++ ...ollerApiResourcesSessionsV1SessionState.ts | 79 ++ ...iResourcesStoragebucketsV1StorageBucket.ts | 220 +++++ .../ControllerApiResourcesTargetsV1Alias.ts | 96 +++ ...urcesTargetsV1AuthorizeSessionArguments.ts | 70 ++ ...erApiResourcesTargetsV1CredentialSource.ts | 100 +++ ...ntrollerApiResourcesTargetsV1HostSource.ts | 71 ++ ...iResourcesTargetsV1SessionAuthorization.ts | 179 ++++ ...rApiResourcesTargetsV1SessionCredential.ts | 96 +++ ...ollerApiResourcesTargetsV1SessionSecret.ts | 72 ++ .../ControllerApiResourcesTargetsV1Target.ts | 279 +++++++ ...ResourcesTargetsV1TargetAliasAttributes.ts | 73 ++ .../ControllerApiResourcesUsersV1Account.ts | 71 ++ .../ControllerApiResourcesUsersV1User.ts | 183 +++++ ...trollerApiResourcesWorkersV1Certificate.ts | 85 ++ ...iResourcesWorkersV1CertificateAuthority.ts | 73 ++ ...ourcesWorkersV1RemoteStoragePermissions.ts | 81 ++ ...ApiResourcesWorkersV1RemoteStorageState.ts | 82 ++ .../ControllerApiResourcesWorkersV1Worker.ts | 242 ++++++ ...vicesV1AccountServiceChangePasswordBody.ts | 82 ++ ...ServicesV1AccountServiceSetPasswordBody.ts | 74 ++ ...lerApiServicesV1AddGroupMembersResponse.ts | 73 ++ ...lerApiServicesV1AddHostSetHostsResponse.ts | 73 ++ ...ApiServicesV1AddRoleGrantScopesResponse.ts | 73 ++ ...ollerApiServicesV1AddRoleGrantsResponse.ts | 73 ++ ...rApiServicesV1AddRolePrincipalsResponse.ts | 73 ++ ...cesV1AddTargetCredentialSourcesResponse.ts | 73 ++ ...iServicesV1AddTargetHostSourcesResponse.ts | 73 ++ ...lerApiServicesV1AddUserAccountsResponse.ts | 73 ++ ...ollerApiServicesV1AddWorkerTagsResponse.ts | 73 ++ ...piServicesV1AttachStoragePolicyResponse.ts | 73 ++ ...icesV1AuthMethodServiceAuthenticateBody.ts | 127 +++ ...vicesV1AuthMethodServiceChangeStateBody.ts | 82 ++ ...rollerApiServicesV1AuthenticateResponse.ts | 104 +++ ...erApiServicesV1AuthorizeSessionResponse.ts | 73 ++ ...ollerApiServicesV1CancelSessionResponse.ts | 73 ++ ...llerApiServicesV1ChangePasswordResponse.ts | 73 ++ ...trollerApiServicesV1ChangeStateResponse.ts | 73 ++ ...ollerApiServicesV1CreateAccountResponse.ts | 81 ++ ...trollerApiServicesV1CreateAliasResponse.ts | 81 ++ ...erApiServicesV1CreateAuthMethodResponse.ts | 81 ++ ...piServicesV1CreateControllerLedResponse.ts | 81 ++ ...rvicesV1CreateCredentialLibraryResponse.ts | 81 ++ ...erApiServicesV1CreateCredentialResponse.ts | 81 ++ ...ServicesV1CreateCredentialStoreResponse.ts | 81 ++ ...trollerApiServicesV1CreateGroupResponse.ts | 81 ++ ...rApiServicesV1CreateHostCatalogResponse.ts | 81 ++ ...ntrollerApiServicesV1CreateHostResponse.ts | 81 ++ ...ollerApiServicesV1CreateHostSetResponse.ts | 81 ++ ...ApiServicesV1CreateManagedGroupResponse.ts | 81 ++ ...rollerApiServicesV1CreatePolicyResponse.ts | 81 ++ ...ntrollerApiServicesV1CreateRoleResponse.ts | 81 ++ ...trollerApiServicesV1CreateScopeResponse.ts | 81 ++ ...piServicesV1CreateStorageBucketResponse.ts | 81 ++ ...rollerApiServicesV1CreateTargetResponse.ts | 81 ++ ...ntrollerApiServicesV1CreateUserResponse.ts | 81 ++ ...lerApiServicesV1CreateWorkerLedResponse.ts | 81 ++ ...erApiServicesV1DestroyKeyVersionRequest.ts | 73 ++ ...rApiServicesV1DestroyKeyVersionResponse.ts | 67 ++ ...piServicesV1DetachStoragePolicyResponse.ts | 73 ++ ...ntrollerApiServicesV1GetAccountResponse.ts | 73 ++ ...ControllerApiServicesV1GetAliasResponse.ts | 73 ++ ...ollerApiServicesV1GetAuthMethodResponse.ts | 73 ++ ...rollerApiServicesV1GetAuthTokenResponse.ts | 73 ++ ...iServicesV1GetCredentialLibraryResponse.ts | 73 ++ ...ollerApiServicesV1GetCredentialResponse.ts | 73 ++ ...ApiServicesV1GetCredentialStoreResponse.ts | 73 ++ ...ControllerApiServicesV1GetGroupResponse.ts | 73 ++ ...llerApiServicesV1GetHostCatalogResponse.ts | 73 ++ .../ControllerApiServicesV1GetHostResponse.ts | 73 ++ ...ntrollerApiServicesV1GetHostSetResponse.ts | 73 ++ ...lerApiServicesV1GetManagedGroupResponse.ts | 73 ++ ...ontrollerApiServicesV1GetPolicyResponse.ts | 73 ++ .../ControllerApiServicesV1GetRoleResponse.ts | 73 ++ ...ControllerApiServicesV1GetScopeResponse.ts | 73 ++ ...piServicesV1GetSessionRecordingResponse.ts | 73 ++ ...ntrollerApiServicesV1GetSessionResponse.ts | 73 ++ ...erApiServicesV1GetStorageBucketResponse.ts | 73 ++ ...ontrollerApiServicesV1GetTargetResponse.ts | 73 ++ .../ControllerApiServicesV1GetUserResponse.ts | 73 ++ ...ontrollerApiServicesV1GetWorkerResponse.ts | 73 ++ ...rvicesV1GroupServiceAddGroupMembersBody.ts | 74 ++ ...cesV1GroupServiceRemoveGroupMembersBody.ts | 74 ++ ...rvicesV1GroupServiceSetGroupMembersBody.ts | 74 ++ ...icesV1HostSetServiceAddHostSetHostsBody.ts | 74 ++ ...sV1HostSetServiceRemoveHostSetHostsBody.ts | 74 ++ ...icesV1HostSetServiceSetHostSetHostsBody.ts | 74 ++ ...rollerApiServicesV1ListAccountsResponse.ts | 129 +++ ...trollerApiServicesV1ListAliasesResponse.ts | 129 +++ ...lerApiServicesV1ListAuthMethodsResponse.ts | 129 +++ ...llerApiServicesV1ListAuthTokensResponse.ts | 129 +++ ...rvicesV1ListCredentialLibrariesResponse.ts | 129 +++ ...iServicesV1ListCredentialStoresResponse.ts | 129 +++ ...lerApiServicesV1ListCredentialsResponse.ts | 129 +++ ...ntrollerApiServicesV1ListGroupsResponse.ts | 129 +++ ...erApiServicesV1ListHostCatalogsResponse.ts | 129 +++ ...rollerApiServicesV1ListHostSetsResponse.ts | 129 +++ ...ontrollerApiServicesV1ListHostsResponse.ts | 129 +++ ...V1ListKeyVersionDestructionJobsResponse.ts | 73 ++ ...ControllerApiServicesV1ListKeysResponse.ts | 73 ++ ...rApiServicesV1ListManagedGroupsResponse.ts | 129 +++ ...rollerApiServicesV1ListPoliciesResponse.ts | 129 +++ ...ServicesV1ListResolvableAliasesResponse.ts | 129 +++ ...ontrollerApiServicesV1ListRolesResponse.ts | 129 +++ ...ntrollerApiServicesV1ListScopesResponse.ts | 129 +++ ...ServicesV1ListSessionRecordingsResponse.ts | 129 +++ ...rollerApiServicesV1ListSessionsResponse.ts | 129 +++ ...ApiServicesV1ListStorageBucketsResponse.ts | 129 +++ ...trollerApiServicesV1ListTargetsResponse.ts | 129 +++ ...ontrollerApiServicesV1ListUsersResponse.ts | 129 +++ ...trollerApiServicesV1ListWorkersResponse.ts | 73 ++ ...ApiServicesV1MonthlyActiveUsersResponse.ts | 73 ++ ...iServicesV1ReApplyStoragePolicyResponse.ts | 73 ++ ...vicesV1ReadCertificateAuthorityResponse.ts | 73 ++ ...einitializeCertificateAuthorityResponse.ts | 73 ++ ...ApiServicesV1RemoveGroupMembersResponse.ts | 73 ++ ...ApiServicesV1RemoveHostSetHostsResponse.ts | 73 ++ ...ServicesV1RemoveRoleGrantScopesResponse.ts | 73 ++ ...erApiServicesV1RemoveRoleGrantsResponse.ts | 73 ++ ...iServicesV1RemoveRolePrincipalsResponse.ts | 73 ++ ...V1RemoveTargetCredentialSourcesResponse.ts | 73 ++ ...rvicesV1RemoveTargetHostSourcesResponse.ts | 73 ++ ...ApiServicesV1RemoveUserAccountsResponse.ts | 73 ++ ...erApiServicesV1RemoveWorkerTagsResponse.ts | 73 ++ ...icesV1RoleServiceAddRoleGrantScopesBody.ts | 74 ++ ...iServicesV1RoleServiceAddRoleGrantsBody.ts | 74 ++ ...vicesV1RoleServiceAddRolePrincipalsBody.ts | 74 ++ ...sV1RoleServiceRemoveRoleGrantScopesBody.ts | 74 ++ ...rvicesV1RoleServiceRemoveRoleGrantsBody.ts | 74 ++ ...esV1RoleServiceRemoveRolePrincipalsBody.ts | 74 ++ ...icesV1RoleServiceSetRoleGrantScopesBody.ts | 74 ++ ...iServicesV1RoleServiceSetRoleGrantsBody.ts | 74 ++ ...vicesV1RoleServiceSetRolePrincipalsBody.ts | 74 ++ ...ontrollerApiServicesV1RotateKeysRequest.ts | 73 ++ ...esV1ScopeServiceAttachStoragePolicyBody.ts | 74 ++ ...esV1ScopeServiceDetachStoragePolicyBody.ts | 66 ++ ...rvicesV1SessionServiceCancelSessionBody.ts | 65 ++ ...lerApiServicesV1SetGroupMembersResponse.ts | 73 ++ ...lerApiServicesV1SetHostSetHostsResponse.ts | 73 ++ ...trollerApiServicesV1SetPasswordResponse.ts | 73 ++ ...ApiServicesV1SetRoleGrantScopesResponse.ts | 73 ++ ...ollerApiServicesV1SetRoleGrantsResponse.ts | 73 ++ ...rApiServicesV1SetRolePrincipalsResponse.ts | 73 ++ ...cesV1SetTargetCredentialSourcesResponse.ts | 73 ++ ...iServicesV1SetTargetHostSourcesResponse.ts | 73 ++ ...lerApiServicesV1SetUserAccountsResponse.ts | 73 ++ ...ollerApiServicesV1SetWorkerTagsResponse.ts | 73 ++ ...etServiceAddTargetCredentialSourcesBody.ts | 84 ++ ...V1TargetServiceAddTargetHostSourcesBody.ts | 74 ++ ...icesV1TargetServiceAuthorizeSessionBody.ts | 89 ++ ...erviceRemoveTargetCredentialSourcesBody.ts | 84 ++ ...argetServiceRemoveTargetHostSourcesBody.ts | 74 ++ ...etServiceSetTargetCredentialSourcesBody.ts | 85 ++ ...V1TargetServiceSetTargetHostSourcesBody.ts | 74 ++ ...ollerApiServicesV1UpdateAccountResponse.ts | 73 ++ ...trollerApiServicesV1UpdateAliasResponse.ts | 73 ++ ...erApiServicesV1UpdateAuthMethodResponse.ts | 73 ++ ...rvicesV1UpdateCredentialLibraryResponse.ts | 73 ++ ...erApiServicesV1UpdateCredentialResponse.ts | 73 ++ ...ServicesV1UpdateCredentialStoreResponse.ts | 73 ++ ...trollerApiServicesV1UpdateGroupResponse.ts | 73 ++ ...rApiServicesV1UpdateHostCatalogResponse.ts | 73 ++ ...ntrollerApiServicesV1UpdateHostResponse.ts | 73 ++ ...ollerApiServicesV1UpdateHostSetResponse.ts | 73 ++ ...ApiServicesV1UpdateManagedGroupResponse.ts | 73 ++ ...rollerApiServicesV1UpdatePolicyResponse.ts | 73 ++ ...ntrollerApiServicesV1UpdateRoleResponse.ts | 73 ++ ...trollerApiServicesV1UpdateScopeResponse.ts | 73 ++ ...piServicesV1UpdateStorageBucketResponse.ts | 73 ++ ...rollerApiServicesV1UpdateTargetResponse.ts | 73 ++ ...ntrollerApiServicesV1UpdateUserResponse.ts | 73 ++ ...rollerApiServicesV1UpdateWorkerResponse.ts | 73 ++ ...ervicesV1UserServiceAddUserAccountsBody.ts | 73 ++ ...icesV1UserServiceRemoveUserAccountsBody.ts | 73 ++ ...ervicesV1UserServiceSetUserAccountsBody.ts | 73 ++ ...ervicesV1WorkerServiceAddWorkerTagsBody.ts | 74 ++ ...icesV1WorkerServiceRemoveWorkerTagsBody.ts | 74 ++ ...ervicesV1WorkerServiceSetWorkerTagsBody.ts | 74 ++ .../api-client/models/ControllerApiV1Error.ts | 97 +++ .../models/ControllerApiV1ErrorDetails.ts | 88 ++ .../models/ControllerApiV1FieldError.ts | 73 ++ .../models/ControllerApiV1WrappedError.ts | 73 ++ .../api-client/models/GoogleApiHttpBody.ts | 132 +++ .../api-client/models/GoogleProtobufAny.ts | 178 ++++ .../models/GoogleProtobufNullValue.ts | 57 ++ e2e-tests/api-client/models/index.ts | 224 +++++ e2e-tests/api-client/runtime.ts | 432 ++++++++++ e2e-tests/global-setup.js | 7 +- e2e-tests/helpers/boundary-api-client.ts | 383 +++++++++ e2e-tests/openapitools.json | 7 + e2e-tests/package.json | 3 + package.json | 4 +- pnpm-lock.yaml | 539 ++++++++++++ 262 files changed, 31646 insertions(+), 192 deletions(-) create mode 100644 e2e-tests/admin/tests/api-client.spec.js create mode 100644 e2e-tests/api-client/.openapi-generator-ignore create mode 100644 e2e-tests/api-client/.openapi-generator/FILES create mode 100644 e2e-tests/api-client/.openapi-generator/VERSION create mode 100644 e2e-tests/api-client/apis/AccountServiceApi.ts create mode 100644 e2e-tests/api-client/apis/AliasServiceApi.ts create mode 100644 e2e-tests/api-client/apis/AuthMethodServiceApi.ts create mode 100644 e2e-tests/api-client/apis/AuthTokenServiceApi.ts create mode 100644 e2e-tests/api-client/apis/BillingServiceApi.ts create mode 100644 e2e-tests/api-client/apis/CredentialLibraryServiceApi.ts create mode 100644 e2e-tests/api-client/apis/CredentialServiceApi.ts create mode 100644 e2e-tests/api-client/apis/CredentialStoreServiceApi.ts create mode 100644 e2e-tests/api-client/apis/GroupServiceApi.ts create mode 100644 e2e-tests/api-client/apis/HostCatalogServiceApi.ts create mode 100644 e2e-tests/api-client/apis/HostServiceApi.ts create mode 100644 e2e-tests/api-client/apis/HostSetServiceApi.ts create mode 100644 e2e-tests/api-client/apis/ManagedGroupServiceApi.ts create mode 100644 e2e-tests/api-client/apis/PolicyServiceApi.ts create mode 100644 e2e-tests/api-client/apis/RoleServiceApi.ts create mode 100644 e2e-tests/api-client/apis/ScopeServiceApi.ts create mode 100644 e2e-tests/api-client/apis/SessionRecordingServiceApi.ts create mode 100644 e2e-tests/api-client/apis/SessionServiceApi.ts create mode 100644 e2e-tests/api-client/apis/StorageBucketServiceApi.ts create mode 100644 e2e-tests/api-client/apis/TargetServiceApi.ts create mode 100644 e2e-tests/api-client/apis/UserServiceApi.ts create mode 100644 e2e-tests/api-client/apis/WorkerServiceApi.ts create mode 100644 e2e-tests/api-client/apis/index.ts create mode 100644 e2e-tests/api-client/index.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesAccountsV1Account.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesAliasesV1Alias.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesAuthmethodsV1AuthMethod.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesAuthtokensV1AuthToken.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesBillingV1ActiveUsers.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesCredentiallibrariesV1CredentialLibrary.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesCredentialsV1Credential.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesCredentialstoresV1CredentialStore.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesGroupsV1Group.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesGroupsV1Member.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesHostcatalogsV1HostCatalog.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesHostsV1Host.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesHostsetsV1HostSet.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesManagedgroupsV1ManagedGroup.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesPluginsV1PluginInfo.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesPoliciesV1Policy.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesRolesV1Grant.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesRolesV1GrantJson.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesRolesV1Principal.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesRolesV1Role.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesScopesV1Key.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesScopesV1KeyVersion.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesScopesV1KeyVersionDestructionJob.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesScopesV1Scope.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesScopesV1ScopeInfo.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ChannelRecording.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ConnectionRecording.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Credential.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1CredentialLibrary.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1CredentialStore.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Host.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1HostCatalog.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1SessionRecording.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Target.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1User.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ValuesAtTime.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionsV1Connection.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionsV1Session.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesSessionsV1SessionState.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesStoragebucketsV1StorageBucket.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesTargetsV1Alias.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesTargetsV1AuthorizeSessionArguments.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesTargetsV1CredentialSource.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesTargetsV1HostSource.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionAuthorization.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionCredential.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionSecret.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesTargetsV1Target.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesTargetsV1TargetAliasAttributes.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesUsersV1Account.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesUsersV1User.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesWorkersV1Certificate.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesWorkersV1CertificateAuthority.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesWorkersV1RemoteStoragePermissions.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesWorkersV1RemoteStorageState.ts create mode 100644 e2e-tests/api-client/models/ControllerApiResourcesWorkersV1Worker.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AccountServiceChangePasswordBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AccountServiceSetPasswordBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AddGroupMembersResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AddHostSetHostsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AddRoleGrantScopesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AddRoleGrantsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AddRolePrincipalsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AddTargetCredentialSourcesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AddTargetHostSourcesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AddUserAccountsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AddWorkerTagsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AttachStoragePolicyResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AuthMethodServiceAuthenticateBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AuthMethodServiceChangeStateBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AuthenticateResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1AuthorizeSessionResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CancelSessionResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ChangePasswordResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ChangeStateResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateAccountResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateAliasResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateAuthMethodResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateControllerLedResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialLibraryResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialStoreResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateGroupResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateHostCatalogResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateHostResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateHostSetResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateManagedGroupResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreatePolicyResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateRoleResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateScopeResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateStorageBucketResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateTargetResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateUserResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1CreateWorkerLedResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1DestroyKeyVersionRequest.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1DestroyKeyVersionResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1DetachStoragePolicyResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetAccountResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetAliasResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetAuthMethodResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetAuthTokenResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialLibraryResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialStoreResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetGroupResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetHostCatalogResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetHostResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetHostSetResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetManagedGroupResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetPolicyResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetRoleResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetScopeResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetSessionRecordingResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetSessionResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetStorageBucketResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetTargetResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetUserResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GetWorkerResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceAddGroupMembersBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceRemoveGroupMembersBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceSetGroupMembersBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceAddHostSetHostsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceSetHostSetHostsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListAccountsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListAliasesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListAuthMethodsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListAuthTokensResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialLibrariesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialStoresResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListGroupsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListHostCatalogsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListHostSetsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListHostsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListKeyVersionDestructionJobsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListKeysResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListManagedGroupsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListPoliciesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListResolvableAliasesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListRolesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListScopesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListSessionRecordingsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListSessionsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListStorageBucketsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListTargetsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListUsersResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ListWorkersResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1MonthlyActiveUsersResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ReApplyStoragePolicyResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ReadCertificateAuthorityResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ReinitializeCertificateAuthorityResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RemoveGroupMembersResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RemoveHostSetHostsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RemoveRoleGrantScopesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RemoveRoleGrantsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RemoveRolePrincipalsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RemoveTargetCredentialSourcesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RemoveTargetHostSourcesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RemoveUserAccountsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RemoveWorkerTagsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRoleGrantsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRolePrincipalsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRoleGrantsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRolePrincipalsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1RotateKeysRequest.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SessionServiceCancelSessionBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SetGroupMembersResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SetHostSetHostsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SetPasswordResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SetRoleGrantScopesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SetRoleGrantsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SetRolePrincipalsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SetTargetCredentialSourcesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SetTargetHostSourcesResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SetUserAccountsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1SetWorkerTagsResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAuthorizeSessionBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateAccountResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateAliasResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateAuthMethodResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialLibraryResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialStoreResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateGroupResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostCatalogResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostSetResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateManagedGroupResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdatePolicyResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateRoleResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateScopeResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateStorageBucketResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateTargetResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateUserResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UpdateWorkerResponse.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UserServiceAddUserAccountsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UserServiceRemoveUserAccountsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1UserServiceSetUserAccountsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceAddWorkerTagsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceSetWorkerTagsBody.ts create mode 100644 e2e-tests/api-client/models/ControllerApiV1Error.ts create mode 100644 e2e-tests/api-client/models/ControllerApiV1ErrorDetails.ts create mode 100644 e2e-tests/api-client/models/ControllerApiV1FieldError.ts create mode 100644 e2e-tests/api-client/models/ControllerApiV1WrappedError.ts create mode 100644 e2e-tests/api-client/models/GoogleApiHttpBody.ts create mode 100644 e2e-tests/api-client/models/GoogleProtobufAny.ts create mode 100644 e2e-tests/api-client/models/GoogleProtobufNullValue.ts create mode 100644 e2e-tests/api-client/models/index.ts create mode 100644 e2e-tests/api-client/runtime.ts create mode 100644 e2e-tests/helpers/boundary-api-client.ts create mode 100644 e2e-tests/openapitools.json diff --git a/.copywrite.hcl b/.copywrite.hcl index e9333c6d8..ee528af4e 100644 --- a/.copywrite.hcl +++ b/.copywrite.hcl @@ -13,9 +13,10 @@ project { "**/node_modules/**", "**/dist/**", "**/coverage/**", - "ui/desktop/electron-app/out/**", - "ui/desktop/electron-app/ember-dist/**", "**/pnpm-lock.yaml", "**/pnpm-workspace.yaml", + "ui/desktop/electron-app/out/**", + "ui/desktop/electron-app/ember-dist/**", + "e2e-tests/api-client/**" ] } diff --git a/e2e-tests/README.md b/e2e-tests/README.md index 9ab8da56d..7fe3317f6 100644 --- a/e2e-tests/README.md +++ b/e2e-tests/README.md @@ -22,6 +22,11 @@ - [Developing Tests](#developing-tests) - [Test names and tagging](#test-names-and-tagging) - [Selecting / Locating Elements](#selecting--locating-elements) + - [Api Client Fixture](#api-client-fixture) + - [Using the fixture](#using-the-fixture) + - [Features](#features) + - [Generating the api client](#generating-the-api-client) + - [Testing with resources (api, page objects, cli)](#testing-with-resources-api-page-objects-cli) @@ -259,3 +264,80 @@ accessibility features perceive the page. `getByLabel` should be used for form f Additional information can be found [here](https://playwright.dev/docs/locators#locating-elements) and [here](https://testing-library.com/docs/queries/about/#priority). + +### Api Client Fixture +The `apiClient` fixture is available in tests to make calls against the boundary api. This fixture wraps an api client that is auto-generated from the [boundary api openapi swagger spec](https://raw.githubusercontent.com/hashicorp/boundary/main/internal/gen/controller.swagger.json). + +#### Using the fixture +The api client fixture can be used in tests anywhere fixtures are available: +```js +// within a test +test( + 'An example test', + { tag: ['@ce', '@ent', '@aws', '@docker'] }, + async ({ apiClient }) => { + org = await apiClient.clients.Scope.scopeServiceCreateScope({ + item: { + name: 'Org A', + scopeId: 'global', + }, + }); + } +); + +// in `beforeEach` (also works the same for `afterEach`) +test.beforeEach(async ({ apiClient }) => { + org = await apiClient.clients.Scope.scopeServiceCreateScope({ + item: { + name: 'Org A', + scopeId: 'global', + }, + }); +}); +``` + +#### Features + +* The api client should have all publicly documented APIs +* Generated api client uses typescript to help with the discovery of the required arguments + * Any untyped `attributes` that have been documented by a `description` in the swagger doc will also be included as a docblock comment when inspecting `attributes` in the editor (see `ControllerApiResourcesAccountsV1Account.attributes` in `models/ControllerApiResourcesAccountsV1Account.ts` for an example) +* Automatic resource clean up + * Any resources created by the api client will be automatically cleaned up after the test is finished. To skip cleanup of a resource pass in the created resource to `apiClient.skipCleanup(createdResource);` (where `createdResource` has an `id` property). + * In some cases resources will need child resources, created outside the api, to be cleaned up first. For example, a storage bucket created by the api client cannot be automatically cleaned up until all session recordings have been deleted. Session recordings are created automatically and not tracked by the API so these need to be deleted manually. Session recordings cannot be deleted unless they are in a `available` state which depends on the session being recorded being in a `terminated` state. Sessions also are not created by the api and need to be cleaned up manually. +* Error logging + * When api calls fail with an http status code >= 400 the error response is logged + +#### Generating the api client + +The generated client is found in the `api-client` folder. Manual changes should not be made to any of the files in this folder because they will be overriden the next time the client is generated. + +To regenerate the api-client run the `generate:api` package.json scripts command. By default this will use the latest swagger doc from the public [`boundary` repo](https://github.com/hashicorp/boundary) on the `main` branch at `main/internal/gen/controller.swagger.json`. Note: The `generate:api` script calls `openapi-generator-cli` which requires java to be available on your PATH environment variable. + +```shell +pnpm generate:api-client +``` + +If working on an E2E test that is working against a different version of the boundary api, ensure the updated openapi swagger doc has been generated and set `OPENAPI_SWAGGER_URL_OR_FILE` to the path or url: +```shell +# using a custom url (must be publicly accessible) +# in the following example $COMMITISH can be replaced with a branch name, commit, or tag +OPENAPI_SWAGGER_URL_OR_FILE=https://raw.githubusercontent.com/hashicorp/boundary/$COMMITISH/internal/gen/controller.swagger.json pnpm generate:api-client + +# using a local absolute or relative path +OPENAPI_SWAGGER_URL_OR_FILE=../../boundary-enterprise/internal/gen/controller.swagger.json pnpm generate:api-client +``` + +Consider committing any changes to the generated `api-client` directory if the changes are needed for the current e2e tests to pass. + +### Testing with resources (api, page objects, cli) + +When testing an E2E workflow, resources often use page objects (within `admin/pages` and `desktop/pages`) or use methods on playwright locators directly. These simulate user actions to ensure that we are testing our applications the way our users use them. + +In cases where resources need to be scaffolded as a prerequisite to a test, but are not needed to be tested directly, the `apiClient` fixture should be used. This type of common setup can usually be done in `test.beforeEach` to separate it from the `test` itself. Using the `apiClient` has the added benefit of: +* being quicker to set up (api calls are faster) +* return api responses and resource definitions +* any created resource is automatically cleaned up after the test + +Aside from creating resources, the `apiClient` fixture can be used in any case where interaction with the boundary api is needed. + +As a last resort when page objects and the `apiClient` fixture can't be used then the boundary cli helper can be used. diff --git a/e2e-tests/admin/tests/api-client.spec.js b/e2e-tests/admin/tests/api-client.spec.js new file mode 100644 index 000000000..7e27bd4ba --- /dev/null +++ b/e2e-tests/admin/tests/api-client.spec.js @@ -0,0 +1,366 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: BUSL-1.1 + */ + +import { test as base } from '../../global-setup.js'; +import { expect } from '@playwright/test'; +import { customAlphabet } from 'nanoid'; + +import * as boundaryCli from '../../helpers/boundary-cli'; +import { readFile } from 'fs/promises'; + +// These tests are to make sure that the api-client fixture works as expected. +// Test helpers or fixtures don't always have tests, but because this one has +// enough complexity it's worth testing + +const nanoid = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz', 5); +const scopeId = 'global'; +const aliasCleanedUpDescription = `this alias should be cleaned up ${nanoid()}`; +const aliasSkippedDescription = `this alias should not be cleaned up ${nanoid()}`; + +const test = base.extend( + { + apiClientTestAfter: async ({}, use) => { + let apiClientTestAfter; + const setApiClientTestAfter = (fn) => { + apiClientTestAfter = fn; + }; + await use(setApiClientTestAfter); + await apiClientTestAfter?.(); + }, + }, + { scope: 'test', auto: true }, +); + +test( + 'resources can be created (example: alias)', + { tag: ['@ce', '@ent', '@aws', '@docker'] }, + async ({ apiClient, apiClientTestAfter }) => { + await apiClient.clients.Alias.aliasServiceCreateAlias({ + item: { + scopeId, + description: aliasCleanedUpDescription, + value: `a-${nanoid(4)}.dev`, + type: 'target', + }, + }); + + const skipAlias = await apiClient.clients.Alias.aliasServiceCreateAlias({ + item: { + scopeId, + description: aliasSkippedDescription, + value: `b-${nanoid(4)}.dev`, + type: 'target', + }, + }); + + apiClient.skipCleanup(skipAlias); + + // These assertions ensure that by the end of this test the two aliases + // exist. In the next test they are checked to see if clean up and + // skipping clean up worked correctly + const aliases = await apiClient.clients.Alias.aliasServiceListAliases({ + scopeId, + }); + const cleanedUpAlias = aliases.items.find( + ({ description }) => description === aliasCleanedUpDescription, + ); + expect(cleanedUpAlias).toBeTruthy(); + const cleanUpSkippedAlias = aliases.items.find( + ({ description }) => description === aliasSkippedDescription, + ); + expect(cleanUpSkippedAlias).toBeTruthy(); + + apiClientTestAfter(async () => { + const aliases = await apiClient.clients.Alias.aliasServiceListAliases({ + scopeId, + }); + const cleanedUpAlias = aliases.items.find( + ({ description }) => description === aliasCleanedUpDescription, + ); + // the `cleanedUpAlias` has been cleaned up so it isn't expected to be found + expect(cleanedUpAlias).toBeFalsy(); + const cleanUpSkippedAlias = aliases.items.find( + ({ description }) => description === aliasSkippedDescription, + ); + // the `cleanUpSkippedAlias` skipped cleanup so it should still exist + expect(cleanUpSkippedAlias).toBeTruthy(); + + // manually clean up skipped resource + await apiClient.clients.Alias.aliasServiceDeleteAlias({ + id: cleanUpSkippedAlias.id, + }); + }); + }, +); + +test( + 'it logs the response when an error is returned from an api call', + { tag: ['@ce', '@ent', '@aws', '@docker'] }, + async ({ apiClient }) => { + const consoleErrors = []; + const originalConsoleError = console.error; + console.error = (toLog) => { + consoleErrors.push(toLog); + }; + + await apiClient.clients.Alias.aliasServiceListAliases({ + scopeId: 'not a valid scope id', + // this request is expected to fail and throw + }).catch(() => {}); + + expect(consoleErrors).toHaveLength(1); + expect(consoleErrors[0]).toContain( + 'Error response from Boundary API, status code: 400, with method: GET', + ); + expect(consoleErrors[0]).toContain('Improperly formatted identifier.'); + + // restore the original console.error + console.error = originalConsoleError; + }, +); + +test( + 'it throws when #skipCleanup is given an object without an id', + { tag: ['@ce', '@ent', '@aws', '@docker'] }, + ({ apiClient }) => { + expect(() => + apiClient.skipCleanup('not an object with an id property'), + ).toThrow('The `id` field is expected on the resource'); + }, +); + +// This test serves as a more complex example and exercises many connected resources. +// It also serves to illustrate that there are some resources, like storage buckets, +// that may be dependent on other resources created outside the api being cleaned up first, +// like sessions being cancelled and session recordings being deleted. Once these are +// cleaned up then automatic clean up should work. +test( + 'Storage buckets can be cleaned up after a session is manually cancelled and session recordings are manually deleted', + { tag: ['@ent', '@docker'] }, + async ({ + controllerAddr, + adminAuthMethodId, + adminLoginName, + adminPassword, + bucketAccessKeyId, + bucketEndpointUrl, + bucketName, + bucketSecretAccessKey, + region, + sshUser, + sshKeyPath, + targetAddress, + targetPort, + workerTagEgress, + apiClient, + apiClientTestAfter, + }) => { + await boundaryCli.checkBoundaryCli(); + + let connect; + try { + await boundaryCli.authenticateBoundary( + controllerAddr, + adminAuthMethodId, + adminLoginName, + adminPassword, + ); + + const org = await apiClient.clients.Scope.scopeServiceCreateScope({ + item: { + name: `Org-${nanoid()}`, + scopeId: 'global', + }, + }); + + const project = await apiClient.clients.Scope.scopeServiceCreateScope({ + item: { + name: `Project-${nanoid()}`, + scopeId: org.id, + }, + }); + + const storageBucket = + await apiClient.clients.StorageBucket.storageBucketServiceCreateStorageBucket( + { + pluginName: 'minio', + item: { + scopeId: org.scopeId, + bucketName, + workerFilter: `"${workerTagEgress}" in "/tags/type"`, + attributes: { + region, + endpoint_url: bucketEndpointUrl, + disable_credential_rotation: true, + }, + secrets: { + access_key_id: bucketAccessKeyId, + secret_access_key: bucketSecretAccessKey, + }, + }, + }, + ); + + const target = await apiClient.clients.Target.targetServiceCreateTarget({ + item: { + name: `ssh-target-${nanoid()}`, + scopeId: project.id, + type: 'ssh', + address: targetAddress, + ingressWorkerFilter: `"${workerTagEgress}" in "/tags/type"`, + egressWorkerFilter: `"${workerTagEgress}" in "/tags/type"`, + attributes: { + default_port: targetPort, + enable_session_recording: true, + storage_bucket_id: storageBucket.id, + }, + }, + }); + + const credentialStore = + await apiClient.clients.CredentialStore.credentialStoreServiceCreateCredentialStore( + { + item: { + scopeId: project.id, + type: 'static', + }, + }, + ); + + const keyData = await readFile(sshKeyPath, { + encoding: 'utf-8', + }); + + const credential = + await apiClient.clients.Credential.credentialServiceCreateCredential({ + item: { + credentialStoreId: credentialStore.id, + type: 'ssh_private_key', + attributes: { + username: sshUser, + private_key: keyData, + }, + }, + }); + + await apiClient.clients.Target.targetServiceAddTargetCredentialSources({ + id: target.id, + body: { + injectedApplicationCredentialSourceIds: [credential.id], + version: 1, + }, + }); + + const storagePolicy = + await apiClient.clients.Policy.policyServiceCreatePolicy({ + item: { + type: 'storage', + scopeId: 'global', + attributes: { + delete_after: { days: 1 }, + }, + }, + }); + + apiClient.clients.Scope.scopeServiceAttachStoragePolicy({ + id: org.id, + body: { + storagePolicyId: storagePolicy.id, + version: 1, + }, + }); + + connect = await boundaryCli.connectSshToTarget(target.id); + + let waitForSessionCount = 0; + let sshSession; + while (!sshSession) { + const sessions = + await apiClient.clients.Session.sessionServiceListSessions({ + scopeId: target.scopeId, + }); + + sshSession = sessions?.items.find( + (session) => + session.status === 'active' && session.targetId === target.id, + ); + + if (waitForSessionCount >= 20) { + throw new Error( + 'Max attempts exceeded waiting for target to session to be created', + ); + } + + // avoid being rate limited + await new Promise((r) => setTimeout(r, 500)); + waitForSessionCount++; + } + + await apiClient.clients.Session.sessionServiceCancelSession({ + id: sshSession.id, + body: { + version: sshSession.version, + }, + }); + + let waitForSessionRecordingCount = 0; + let completedSessionRecording; + while (!completedSessionRecording) { + completedSessionRecording = ( + await apiClient.clients.SessionRecording.sessionRecordingServiceListSessionRecordings( + { + scopeId: 'global', + recursive: true, + }, + ) + ).items.find( + (recording) => + recording.sessionId === sshSession.id && + recording.state === 'available', + ); + + // Session recordings have to be cleaned up manually before a storage bucket can be deleted. + // And session recordings can only be cleaned up once they are completed + if (completedSessionRecording) { + await apiClient.clients.SessionRecording.sessionRecordingServiceDeleteSessionRecording( + { + id: completedSessionRecording.id, + body: { version: completedSessionRecording.version }, + }, + ); + } + + if (waitForSessionRecordingCount >= 20) { + throw new Error( + 'Max attempts exceeded waiting for target to session recording to be completed', + ); + } + + // avoid being rate limited + await new Promise((r) => setTimeout(r, 500)); + waitForSessionRecordingCount++; + } + } finally { + // End `boundary connect` process + connect?.kill('SIGTERM'); + } + + apiClientTestAfter(async () => { + const storageBuckets = + ( + await apiClient.clients.StorageBucket.storageBucketServiceListStorageBuckets( + { + scopeId: 'global', + recursive: true, + }, + ) + ).items ?? []; + + expect( + storageBuckets.find((bucket) => bucket.id === storageBuckets.id), + ).toBeUndefined(); + }); + }, +); diff --git a/e2e-tests/admin/tests/pagination.spec.js b/e2e-tests/admin/tests/pagination.spec.js index 970a996d1..718a3f430 100644 --- a/e2e-tests/admin/tests/pagination.spec.js +++ b/e2e-tests/admin/tests/pagination.spec.js @@ -5,159 +5,166 @@ import { test } from '../../global-setup.js'; import { expect } from '@playwright/test'; - -import * as boundaryHttp from '../../helpers/boundary-http.js'; +import { nanoid } from 'nanoid'; test( 'Search and Pagination (Targets)', { tag: ['@ce', '@ent', '@aws', '@docker'] }, - async ({ page, request }) => { - let org; - try { - org = await boundaryHttp.createOrg(request); - const project = await boundaryHttp.createProject(request, org.id); + async ({ page, apiClient }) => { + const org = await apiClient.clients.Scope.scopeServiceCreateScope({ + item: { + name: `Org-${nanoid()}`, + scopeId: 'global', + }, + }); - // Create targets - let targets = []; - const targetCount = 15; - for (let i = 0; i < targetCount; i++) { - const target = await boundaryHttp.createTarget(request, { + const project = await apiClient.clients.Scope.scopeServiceCreateScope({ + item: { + name: `Project-${nanoid()}`, + scopeId: org.id, + }, + }); + + // Create targets + let targets = []; + const targetCount = 15; + for (let i = 0; i < targetCount; i++) { + const target = await apiClient.clients.Target.targetServiceCreateTarget({ + item: { + name: `Target-${nanoid()}`, scopeId: project.id, type: 'tcp', - port: 22, - }); - targets.push(target); - } + attributes: { + default_port: 22, + }, + }, + }); - // Navigate to targets page - await page.goto('/'); - await page.getByRole('link', { name: org.name }).click(); - await page.getByRole('link', { name: project.name }).click(); - await page - .getByRole('navigation', { name: 'Application local navigation' }) - .getByRole('link', { name: 'Targets' }) - .click(); - await expect( - page.getByRole('heading', { name: 'Targets' }), - ).toBeVisible(); - - // Check pagination - // The most recent target should be visible. The oldest target should not be - // visible since there are 15 targets and the default page size is 10. - await expect( - page.getByRole('link', { name: targets[targets.length - 1].name }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: targets[0].name }), - ).toBeHidden(); - - // Navigate to the second page. The oldest target should now be visible. - await page - .getByRole('navigation', { name: 'pagination' }) - .getByRole('link', { name: 'page 2' }) - .click(); - await expect( - page.getByRole('link', { name: targets[0].name }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: targets[targets.length - 1].name }), - ).toBeHidden(); - - // Use the "previous page" button to navigate back to the first page. - await page - .getByRole('navigation', { name: 'pagination' }) - .getByRole('link', { name: 'Previous page' }) - .click(); - await expect( - page.getByRole('link', { name: targets[0].name }), - ).toBeHidden(); - await expect( - page.getByRole('link', { name: targets[targets.length - 1].name }), - ).toBeVisible(); - - // Use the "next page" button to navigate back to the second page. - await page - .getByRole('navigation', { name: 'pagination' }) - .getByRole('link', { name: 'Next page' }) - .click(); - await expect( - page.getByRole('link', { name: targets[0].name }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: targets[targets.length - 1].name }), - ).toBeHidden(); - - // Use the search box to find the most recent target. - await page - .getByRole('searchbox', { name: 'Search' }) - .fill(targets[targets.length - 1].name); - await expect( - page.getByRole('link', { name: targets[0].name }), - ).toBeHidden(); - await expect( - page.getByRole('link', { name: targets[targets.length - 1].name }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: targets[targets.length - 2].name }), - ).toBeHidden(); - - // Clear the search box - await page.getByRole('searchbox', { name: 'Search' }).clear(); - await expect( - page.getByRole('link', { name: targets[0].name }), - ).toBeHidden(); - await expect( - page.getByRole('link', { name: targets[targets.length - 2].name }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: targets[targets.length - 1].name }), - ).toBeVisible(); - - // Use the "Items per page" options to show 30 items per page. - await page - .getByRole('combobox', { name: 'Items per page' }) - .selectOption('30'); - await expect( - page.getByRole('link', { name: targets[0].name }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: targets[targets.length - 1].name }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: targets[targets.length - 2].name }), - ).toBeVisible(); - - // Use the "Items per page" options to show 50 items per page. - await page - .getByRole('combobox', { name: 'Items per page' }) - .selectOption('50'); - await expect( - page.getByRole('link', { name: targets[0].name }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: targets[targets.length - 1].name }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: targets[targets.length - 2].name }), - ).toBeVisible(); - - // Use the "Items per page" options to show 10 items per page. - await page - .getByRole('combobox', { name: 'Items per page' }) - .selectOption('10'); - await expect( - page.getByRole('link', { name: targets[0].name }), - ).toBeHidden(); - await expect( - page.getByRole('link', { name: targets[targets.length - 2].name }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: targets[targets.length - 1].name }), - ).toBeVisible(); - } finally { - if (org.id) { - org = await request.delete(`/v1/scopes/${org.id}`); - } + targets.push(target); } + + // Navigate to targets page + await page.goto('/'); + await page.getByRole('link', { name: org.name }).click(); + await page.getByRole('link', { name: project.name }).click(); + await page + .getByRole('navigation', { name: 'Application local navigation' }) + .getByRole('link', { name: 'Targets' }) + .click(); + await expect(page.getByRole('heading', { name: 'Targets' })).toBeVisible(); + + // Check pagination + // The most recent target should be visible. The oldest target should not be + // visible since there are 15 targets and the default page size is 10. + await expect( + page.getByRole('link', { name: targets[targets.length - 1].name }), + ).toBeVisible(); + await expect( + page.getByRole('link', { name: targets[0].name }), + ).toBeHidden(); + + // Navigate to the second page. The oldest target should now be visible. + await page + .getByRole('navigation', { name: 'pagination' }) + .getByRole('link', { name: 'page 2' }) + .click(); + await expect( + page.getByRole('link', { name: targets[0].name }), + ).toBeVisible(); + await expect( + page.getByRole('link', { name: targets[targets.length - 1].name }), + ).toBeHidden(); + + // Use the "previous page" button to navigate back to the first page. + await page + .getByRole('navigation', { name: 'pagination' }) + .getByRole('link', { name: 'Previous page' }) + .click(); + await expect( + page.getByRole('link', { name: targets[0].name }), + ).toBeHidden(); + await expect( + page.getByRole('link', { name: targets[targets.length - 1].name }), + ).toBeVisible(); + + // Use the "next page" button to navigate back to the second page. + await page + .getByRole('navigation', { name: 'pagination' }) + .getByRole('link', { name: 'Next page' }) + .click(); + await expect( + page.getByRole('link', { name: targets[0].name }), + ).toBeVisible(); + await expect( + page.getByRole('link', { name: targets[targets.length - 1].name }), + ).toBeHidden(); + + // Use the search box to find the most recent target. + await page + .getByRole('searchbox', { name: 'Search' }) + .fill(targets[targets.length - 1].name); + await expect( + page.getByRole('link', { name: targets[0].name }), + ).toBeHidden(); + await expect( + page.getByRole('link', { name: targets[targets.length - 1].name }), + ).toBeVisible(); + await expect( + page.getByRole('link', { name: targets[targets.length - 2].name }), + ).toBeHidden(); + + // Clear the search box + await page.getByRole('searchbox', { name: 'Search' }).clear(); + await expect( + page.getByRole('link', { name: targets[0].name }), + ).toBeHidden(); + await expect( + page.getByRole('link', { name: targets[targets.length - 2].name }), + ).toBeVisible(); + await expect( + page.getByRole('link', { name: targets[targets.length - 1].name }), + ).toBeVisible(); + + // Use the "Items per page" options to show 30 items per page. + await page + .getByRole('combobox', { name: 'Items per page' }) + .selectOption('30'); + await expect( + page.getByRole('link', { name: targets[0].name }), + ).toBeVisible(); + await expect( + page.getByRole('link', { name: targets[targets.length - 1].name }), + ).toBeVisible(); + await expect( + page.getByRole('link', { name: targets[targets.length - 2].name }), + ).toBeVisible(); + + // Use the "Items per page" options to show 50 items per page. + await page + .getByRole('combobox', { name: 'Items per page' }) + .selectOption('50'); + await expect( + page.getByRole('link', { name: targets[0].name }), + ).toBeVisible(); + await expect( + page.getByRole('link', { name: targets[targets.length - 1].name }), + ).toBeVisible(); + await expect( + page.getByRole('link', { name: targets[targets.length - 2].name }), + ).toBeVisible(); + + // Use the "Items per page" options to show 10 items per page. + await page + .getByRole('combobox', { name: 'Items per page' }) + .selectOption('10'); + await expect( + page.getByRole('link', { name: targets[0].name }), + ).toBeHidden(); + await expect( + page.getByRole('link', { name: targets[targets.length - 2].name }), + ).toBeVisible(); + await expect( + page.getByRole('link', { name: targets[targets.length - 1].name }), + ).toBeVisible(); }, ); diff --git a/e2e-tests/admin/tests/sorting.spec.js b/e2e-tests/admin/tests/sorting.spec.js index ea8bb56bf..e4532ffc4 100644 --- a/e2e-tests/admin/tests/sorting.spec.js +++ b/e2e-tests/admin/tests/sorting.spec.js @@ -4,8 +4,6 @@ */ import { test } from '../../global-setup.js'; -import * as boundaryHttp from '../../helpers/boundary-http.js'; -import * as boundaryCli from '../../helpers/boundary-cli.js'; import { RolesPage } from '../pages/roles.js'; import { expect } from '@playwright/test'; @@ -33,48 +31,33 @@ const columnHeaders = Object.freeze({ let org, rolesSortedByCreatedTime, rolesSortedByName, rolesSortedById; -test.beforeEach( - async ({ - request, - controllerAddr, - adminAuthMethodId, - adminLoginName, - adminPassword, - }) => { - org = await boundaryHttp.createOrg(request); +test.beforeEach(async ({ apiClient }) => { + org = await apiClient.clients.Scope.scopeServiceCreateScope({ + item: { + scopeId: 'global', + }, + skipAdminRoleCreation: true, + skipDefaultRoleCreation: true, + }); - await boundaryCli.authenticateBoundary( - controllerAddr, - adminAuthMethodId, - adminLoginName, - adminPassword, - ); + // create roles with specific names + const roles = await Promise.all( + roleNamesToCreate.map((roleName) => { + return apiClient.clients.Role.roleServiceCreateRole({ + item: { + scopeId: org.id, + name: roleName, + }, + }); + }), + ); - // when the org is created some roles are created automatically, but for the purposes - // of this sorting test it's clearer if only the roles created by the test are present - const existingRolesToDelete = await boundaryCli.listRoles(org.id); - for (const role of existingRolesToDelete) { - await boundaryCli.deleteRole(role.id); - } - - // create roles with specific names - for (const roleName of roleNamesToCreate) { - boundaryCli.createRole(org.id, { name: roleName }); - } - - // collect all roles and data so that sorting can be tested based on the underlying data - const roles = await boundaryCli.listRoles(org.id); - rolesSortedByCreatedTime = roles.toSorted((a, b) => { - return new Date(b.created_time) - new Date(a.created_time); - }); - rolesSortedByName = roles.toSorted((a, b) => a.name.localeCompare(b.name)); - rolesSortedById = roles.toSorted((a, b) => a.id.localeCompare(b.id)); - }, -); - -test.afterEach(async ({ request }) => { - // deletes the org and any associated roles - await boundaryHttp.deleteOrg(request, org.id); + // collect all roles and data so that sorting can be tested based on the underlying data + rolesSortedByCreatedTime = roles.toSorted((a, b) => { + return new Date(b.createdTime) - new Date(a.createdTime); + }); + rolesSortedByName = roles.toSorted((a, b) => a.name.localeCompare(b.name)); + rolesSortedById = roles.toSorted((a, b) => a.id.localeCompare(b.id)); }); test( diff --git a/e2e-tests/api-client/.openapi-generator-ignore b/e2e-tests/api-client/.openapi-generator-ignore new file mode 100644 index 000000000..7484ee590 --- /dev/null +++ b/e2e-tests/api-client/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/e2e-tests/api-client/.openapi-generator/FILES b/e2e-tests/api-client/.openapi-generator/FILES new file mode 100644 index 000000000..e78ad9235 --- /dev/null +++ b/e2e-tests/api-client/.openapi-generator/FILES @@ -0,0 +1,249 @@ +.openapi-generator-ignore +apis/AccountServiceApi.ts +apis/AliasServiceApi.ts +apis/AuthMethodServiceApi.ts +apis/AuthTokenServiceApi.ts +apis/BillingServiceApi.ts +apis/CredentialLibraryServiceApi.ts +apis/CredentialServiceApi.ts +apis/CredentialStoreServiceApi.ts +apis/GroupServiceApi.ts +apis/HostCatalogServiceApi.ts +apis/HostServiceApi.ts +apis/HostSetServiceApi.ts +apis/ManagedGroupServiceApi.ts +apis/PolicyServiceApi.ts +apis/RoleServiceApi.ts +apis/ScopeServiceApi.ts +apis/SessionRecordingServiceApi.ts +apis/SessionServiceApi.ts +apis/StorageBucketServiceApi.ts +apis/TargetServiceApi.ts +apis/UserServiceApi.ts +apis/WorkerServiceApi.ts +apis/index.ts +index.ts +models/ControllerApiResourcesAccountsV1Account.ts +models/ControllerApiResourcesAliasesV1Alias.ts +models/ControllerApiResourcesAuthmethodsV1AuthMethod.ts +models/ControllerApiResourcesAuthtokensV1AuthToken.ts +models/ControllerApiResourcesBillingV1ActiveUsers.ts +models/ControllerApiResourcesCredentiallibrariesV1CredentialLibrary.ts +models/ControllerApiResourcesCredentialsV1Credential.ts +models/ControllerApiResourcesCredentialstoresV1CredentialStore.ts +models/ControllerApiResourcesGroupsV1Group.ts +models/ControllerApiResourcesGroupsV1Member.ts +models/ControllerApiResourcesHostcatalogsV1HostCatalog.ts +models/ControllerApiResourcesHostsV1Host.ts +models/ControllerApiResourcesHostsetsV1HostSet.ts +models/ControllerApiResourcesManagedgroupsV1ManagedGroup.ts +models/ControllerApiResourcesPluginsV1PluginInfo.ts +models/ControllerApiResourcesPoliciesV1Policy.ts +models/ControllerApiResourcesRolesV1Grant.ts +models/ControllerApiResourcesRolesV1GrantJson.ts +models/ControllerApiResourcesRolesV1Principal.ts +models/ControllerApiResourcesRolesV1Role.ts +models/ControllerApiResourcesScopesV1Key.ts +models/ControllerApiResourcesScopesV1KeyVersion.ts +models/ControllerApiResourcesScopesV1KeyVersionDestructionJob.ts +models/ControllerApiResourcesScopesV1Scope.ts +models/ControllerApiResourcesScopesV1ScopeInfo.ts +models/ControllerApiResourcesSessionrecordingsV1ChannelRecording.ts +models/ControllerApiResourcesSessionrecordingsV1ConnectionRecording.ts +models/ControllerApiResourcesSessionrecordingsV1Credential.ts +models/ControllerApiResourcesSessionrecordingsV1CredentialLibrary.ts +models/ControllerApiResourcesSessionrecordingsV1CredentialStore.ts +models/ControllerApiResourcesSessionrecordingsV1Host.ts +models/ControllerApiResourcesSessionrecordingsV1HostCatalog.ts +models/ControllerApiResourcesSessionrecordingsV1SessionRecording.ts +models/ControllerApiResourcesSessionrecordingsV1Target.ts +models/ControllerApiResourcesSessionrecordingsV1User.ts +models/ControllerApiResourcesSessionrecordingsV1ValuesAtTime.ts +models/ControllerApiResourcesSessionsV1Connection.ts +models/ControllerApiResourcesSessionsV1Session.ts +models/ControllerApiResourcesSessionsV1SessionState.ts +models/ControllerApiResourcesStoragebucketsV1StorageBucket.ts +models/ControllerApiResourcesTargetsV1Alias.ts +models/ControllerApiResourcesTargetsV1AuthorizeSessionArguments.ts +models/ControllerApiResourcesTargetsV1CredentialSource.ts +models/ControllerApiResourcesTargetsV1HostSource.ts +models/ControllerApiResourcesTargetsV1SessionAuthorization.ts +models/ControllerApiResourcesTargetsV1SessionCredential.ts +models/ControllerApiResourcesTargetsV1SessionSecret.ts +models/ControllerApiResourcesTargetsV1Target.ts +models/ControllerApiResourcesTargetsV1TargetAliasAttributes.ts +models/ControllerApiResourcesUsersV1Account.ts +models/ControllerApiResourcesUsersV1User.ts +models/ControllerApiResourcesWorkersV1Certificate.ts +models/ControllerApiResourcesWorkersV1CertificateAuthority.ts +models/ControllerApiResourcesWorkersV1RemoteStoragePermissions.ts +models/ControllerApiResourcesWorkersV1RemoteStorageState.ts +models/ControllerApiResourcesWorkersV1Worker.ts +models/ControllerApiServicesV1AccountServiceChangePasswordBody.ts +models/ControllerApiServicesV1AccountServiceSetPasswordBody.ts +models/ControllerApiServicesV1AddGroupMembersResponse.ts +models/ControllerApiServicesV1AddHostSetHostsResponse.ts +models/ControllerApiServicesV1AddRoleGrantScopesResponse.ts +models/ControllerApiServicesV1AddRoleGrantsResponse.ts +models/ControllerApiServicesV1AddRolePrincipalsResponse.ts +models/ControllerApiServicesV1AddTargetCredentialSourcesResponse.ts +models/ControllerApiServicesV1AddTargetHostSourcesResponse.ts +models/ControllerApiServicesV1AddUserAccountsResponse.ts +models/ControllerApiServicesV1AddWorkerTagsResponse.ts +models/ControllerApiServicesV1AttachStoragePolicyResponse.ts +models/ControllerApiServicesV1AuthMethodServiceAuthenticateBody.ts +models/ControllerApiServicesV1AuthMethodServiceChangeStateBody.ts +models/ControllerApiServicesV1AuthenticateResponse.ts +models/ControllerApiServicesV1AuthorizeSessionResponse.ts +models/ControllerApiServicesV1CancelSessionResponse.ts +models/ControllerApiServicesV1ChangePasswordResponse.ts +models/ControllerApiServicesV1ChangeStateResponse.ts +models/ControllerApiServicesV1CreateAccountResponse.ts +models/ControllerApiServicesV1CreateAliasResponse.ts +models/ControllerApiServicesV1CreateAuthMethodResponse.ts +models/ControllerApiServicesV1CreateControllerLedResponse.ts +models/ControllerApiServicesV1CreateCredentialLibraryResponse.ts +models/ControllerApiServicesV1CreateCredentialResponse.ts +models/ControllerApiServicesV1CreateCredentialStoreResponse.ts +models/ControllerApiServicesV1CreateGroupResponse.ts +models/ControllerApiServicesV1CreateHostCatalogResponse.ts +models/ControllerApiServicesV1CreateHostResponse.ts +models/ControllerApiServicesV1CreateHostSetResponse.ts +models/ControllerApiServicesV1CreateManagedGroupResponse.ts +models/ControllerApiServicesV1CreatePolicyResponse.ts +models/ControllerApiServicesV1CreateRoleResponse.ts +models/ControllerApiServicesV1CreateScopeResponse.ts +models/ControllerApiServicesV1CreateStorageBucketResponse.ts +models/ControllerApiServicesV1CreateTargetResponse.ts +models/ControllerApiServicesV1CreateUserResponse.ts +models/ControllerApiServicesV1CreateWorkerLedResponse.ts +models/ControllerApiServicesV1DestroyKeyVersionRequest.ts +models/ControllerApiServicesV1DestroyKeyVersionResponse.ts +models/ControllerApiServicesV1DetachStoragePolicyResponse.ts +models/ControllerApiServicesV1GetAccountResponse.ts +models/ControllerApiServicesV1GetAliasResponse.ts +models/ControllerApiServicesV1GetAuthMethodResponse.ts +models/ControllerApiServicesV1GetAuthTokenResponse.ts +models/ControllerApiServicesV1GetCredentialLibraryResponse.ts +models/ControllerApiServicesV1GetCredentialResponse.ts +models/ControllerApiServicesV1GetCredentialStoreResponse.ts +models/ControllerApiServicesV1GetGroupResponse.ts +models/ControllerApiServicesV1GetHostCatalogResponse.ts +models/ControllerApiServicesV1GetHostResponse.ts +models/ControllerApiServicesV1GetHostSetResponse.ts +models/ControllerApiServicesV1GetManagedGroupResponse.ts +models/ControllerApiServicesV1GetPolicyResponse.ts +models/ControllerApiServicesV1GetRoleResponse.ts +models/ControllerApiServicesV1GetScopeResponse.ts +models/ControllerApiServicesV1GetSessionRecordingResponse.ts +models/ControllerApiServicesV1GetSessionResponse.ts +models/ControllerApiServicesV1GetStorageBucketResponse.ts +models/ControllerApiServicesV1GetTargetResponse.ts +models/ControllerApiServicesV1GetUserResponse.ts +models/ControllerApiServicesV1GetWorkerResponse.ts +models/ControllerApiServicesV1GroupServiceAddGroupMembersBody.ts +models/ControllerApiServicesV1GroupServiceRemoveGroupMembersBody.ts +models/ControllerApiServicesV1GroupServiceSetGroupMembersBody.ts +models/ControllerApiServicesV1HostSetServiceAddHostSetHostsBody.ts +models/ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody.ts +models/ControllerApiServicesV1HostSetServiceSetHostSetHostsBody.ts +models/ControllerApiServicesV1ListAccountsResponse.ts +models/ControllerApiServicesV1ListAliasesResponse.ts +models/ControllerApiServicesV1ListAuthMethodsResponse.ts +models/ControllerApiServicesV1ListAuthTokensResponse.ts +models/ControllerApiServicesV1ListCredentialLibrariesResponse.ts +models/ControllerApiServicesV1ListCredentialStoresResponse.ts +models/ControllerApiServicesV1ListCredentialsResponse.ts +models/ControllerApiServicesV1ListGroupsResponse.ts +models/ControllerApiServicesV1ListHostCatalogsResponse.ts +models/ControllerApiServicesV1ListHostSetsResponse.ts +models/ControllerApiServicesV1ListHostsResponse.ts +models/ControllerApiServicesV1ListKeyVersionDestructionJobsResponse.ts +models/ControllerApiServicesV1ListKeysResponse.ts +models/ControllerApiServicesV1ListManagedGroupsResponse.ts +models/ControllerApiServicesV1ListPoliciesResponse.ts +models/ControllerApiServicesV1ListResolvableAliasesResponse.ts +models/ControllerApiServicesV1ListRolesResponse.ts +models/ControllerApiServicesV1ListScopesResponse.ts +models/ControllerApiServicesV1ListSessionRecordingsResponse.ts +models/ControllerApiServicesV1ListSessionsResponse.ts +models/ControllerApiServicesV1ListStorageBucketsResponse.ts +models/ControllerApiServicesV1ListTargetsResponse.ts +models/ControllerApiServicesV1ListUsersResponse.ts +models/ControllerApiServicesV1ListWorkersResponse.ts +models/ControllerApiServicesV1MonthlyActiveUsersResponse.ts +models/ControllerApiServicesV1ReApplyStoragePolicyResponse.ts +models/ControllerApiServicesV1ReadCertificateAuthorityResponse.ts +models/ControllerApiServicesV1ReinitializeCertificateAuthorityResponse.ts +models/ControllerApiServicesV1RemoveGroupMembersResponse.ts +models/ControllerApiServicesV1RemoveHostSetHostsResponse.ts +models/ControllerApiServicesV1RemoveRoleGrantScopesResponse.ts +models/ControllerApiServicesV1RemoveRoleGrantsResponse.ts +models/ControllerApiServicesV1RemoveRolePrincipalsResponse.ts +models/ControllerApiServicesV1RemoveTargetCredentialSourcesResponse.ts +models/ControllerApiServicesV1RemoveTargetHostSourcesResponse.ts +models/ControllerApiServicesV1RemoveUserAccountsResponse.ts +models/ControllerApiServicesV1RemoveWorkerTagsResponse.ts +models/ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody.ts +models/ControllerApiServicesV1RoleServiceAddRoleGrantsBody.ts +models/ControllerApiServicesV1RoleServiceAddRolePrincipalsBody.ts +models/ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody.ts +models/ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody.ts +models/ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody.ts +models/ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody.ts +models/ControllerApiServicesV1RoleServiceSetRoleGrantsBody.ts +models/ControllerApiServicesV1RoleServiceSetRolePrincipalsBody.ts +models/ControllerApiServicesV1RotateKeysRequest.ts +models/ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody.ts +models/ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody.ts +models/ControllerApiServicesV1SessionServiceCancelSessionBody.ts +models/ControllerApiServicesV1SetGroupMembersResponse.ts +models/ControllerApiServicesV1SetHostSetHostsResponse.ts +models/ControllerApiServicesV1SetPasswordResponse.ts +models/ControllerApiServicesV1SetRoleGrantScopesResponse.ts +models/ControllerApiServicesV1SetRoleGrantsResponse.ts +models/ControllerApiServicesV1SetRolePrincipalsResponse.ts +models/ControllerApiServicesV1SetTargetCredentialSourcesResponse.ts +models/ControllerApiServicesV1SetTargetHostSourcesResponse.ts +models/ControllerApiServicesV1SetUserAccountsResponse.ts +models/ControllerApiServicesV1SetWorkerTagsResponse.ts +models/ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody.ts +models/ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody.ts +models/ControllerApiServicesV1TargetServiceAuthorizeSessionBody.ts +models/ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody.ts +models/ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody.ts +models/ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody.ts +models/ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody.ts +models/ControllerApiServicesV1UpdateAccountResponse.ts +models/ControllerApiServicesV1UpdateAliasResponse.ts +models/ControllerApiServicesV1UpdateAuthMethodResponse.ts +models/ControllerApiServicesV1UpdateCredentialLibraryResponse.ts +models/ControllerApiServicesV1UpdateCredentialResponse.ts +models/ControllerApiServicesV1UpdateCredentialStoreResponse.ts +models/ControllerApiServicesV1UpdateGroupResponse.ts +models/ControllerApiServicesV1UpdateHostCatalogResponse.ts +models/ControllerApiServicesV1UpdateHostResponse.ts +models/ControllerApiServicesV1UpdateHostSetResponse.ts +models/ControllerApiServicesV1UpdateManagedGroupResponse.ts +models/ControllerApiServicesV1UpdatePolicyResponse.ts +models/ControllerApiServicesV1UpdateRoleResponse.ts +models/ControllerApiServicesV1UpdateScopeResponse.ts +models/ControllerApiServicesV1UpdateStorageBucketResponse.ts +models/ControllerApiServicesV1UpdateTargetResponse.ts +models/ControllerApiServicesV1UpdateUserResponse.ts +models/ControllerApiServicesV1UpdateWorkerResponse.ts +models/ControllerApiServicesV1UserServiceAddUserAccountsBody.ts +models/ControllerApiServicesV1UserServiceRemoveUserAccountsBody.ts +models/ControllerApiServicesV1UserServiceSetUserAccountsBody.ts +models/ControllerApiServicesV1WorkerServiceAddWorkerTagsBody.ts +models/ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody.ts +models/ControllerApiServicesV1WorkerServiceSetWorkerTagsBody.ts +models/ControllerApiV1Error.ts +models/ControllerApiV1ErrorDetails.ts +models/ControllerApiV1FieldError.ts +models/ControllerApiV1WrappedError.ts +models/GoogleApiHttpBody.ts +models/GoogleProtobufAny.ts +models/GoogleProtobufNullValue.ts +models/index.ts +runtime.ts diff --git a/e2e-tests/api-client/.openapi-generator/VERSION b/e2e-tests/api-client/.openapi-generator/VERSION new file mode 100644 index 000000000..eb1dc6a51 --- /dev/null +++ b/e2e-tests/api-client/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.13.0 diff --git a/e2e-tests/api-client/apis/AccountServiceApi.ts b/e2e-tests/api-client/apis/AccountServiceApi.ts new file mode 100644 index 000000000..77fa6c8bc --- /dev/null +++ b/e2e-tests/api-client/apis/AccountServiceApi.ts @@ -0,0 +1,377 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesAccountsV1Account, + ControllerApiServicesV1AccountServiceChangePasswordBody, + ControllerApiServicesV1AccountServiceSetPasswordBody, + ControllerApiServicesV1ListAccountsResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesAccountsV1AccountFromJSON, + ControllerApiResourcesAccountsV1AccountToJSON, + ControllerApiServicesV1AccountServiceChangePasswordBodyFromJSON, + ControllerApiServicesV1AccountServiceChangePasswordBodyToJSON, + ControllerApiServicesV1AccountServiceSetPasswordBodyFromJSON, + ControllerApiServicesV1AccountServiceSetPasswordBodyToJSON, + ControllerApiServicesV1ListAccountsResponseFromJSON, + ControllerApiServicesV1ListAccountsResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface AccountServiceChangePasswordRequest { + id: string; + body: ControllerApiServicesV1AccountServiceChangePasswordBody; +} + +export interface AccountServiceCreateAccountRequest { + item: Omit; +} + +export interface AccountServiceDeleteAccountRequest { + id: string; +} + +export interface AccountServiceGetAccountRequest { + id: string; +} + +export interface AccountServiceListAccountsRequest { + authMethodId?: string; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface AccountServiceSetPasswordRequest { + id: string; + body: ControllerApiServicesV1AccountServiceSetPasswordBody; +} + +export interface AccountServiceUpdateAccountRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class AccountServiceApi extends runtime.BaseAPI { + + /** + * Sets the password for the provided account. + */ + async accountServiceChangePasswordRaw(requestParameters: AccountServiceChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling accountServiceChangePassword().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling accountServiceChangePassword().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/accounts/{id}:change-password`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1AccountServiceChangePasswordBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAccountsV1AccountFromJSON(jsonValue)); + } + + /** + * Sets the password for the provided account. + */ + async accountServiceChangePassword(requestParameters: AccountServiceChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.accountServiceChangePasswordRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a single account in the provided auth method. + */ + async accountServiceCreateAccountRaw(requestParameters: AccountServiceCreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling accountServiceCreateAccount().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/accounts`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesAccountsV1AccountToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAccountsV1AccountFromJSON(jsonValue)); + } + + /** + * Creates a single account in the provided auth method. + */ + async accountServiceCreateAccount(requestParameters: AccountServiceCreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.accountServiceCreateAccountRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes an account. + */ + async accountServiceDeleteAccountRaw(requestParameters: AccountServiceDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling accountServiceDeleteAccount().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/accounts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes an account. + */ + async accountServiceDeleteAccount(requestParameters: AccountServiceDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.accountServiceDeleteAccountRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single account based on the input ID + */ + async accountServiceGetAccountRaw(requestParameters: AccountServiceGetAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling accountServiceGetAccount().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/accounts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAccountsV1AccountFromJSON(jsonValue)); + } + + /** + * Gets a single account based on the input ID + */ + async accountServiceGetAccount(requestParameters: AccountServiceGetAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.accountServiceGetAccountRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all accounts in a specific auth method. + */ + async accountServiceListAccountsRaw(requestParameters: AccountServiceListAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['authMethodId'] != null) { + queryParameters['auth_method_id'] = requestParameters['authMethodId']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/accounts`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListAccountsResponseFromJSON(jsonValue)); + } + + /** + * Lists all accounts in a specific auth method. + */ + async accountServiceListAccounts(requestParameters: AccountServiceListAccountsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.accountServiceListAccountsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Sets the password for the provided account. + */ + async accountServiceSetPasswordRaw(requestParameters: AccountServiceSetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling accountServiceSetPassword().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling accountServiceSetPassword().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/accounts/{id}:set-password`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1AccountServiceSetPasswordBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAccountsV1AccountFromJSON(jsonValue)); + } + + /** + * Sets the password for the provided account. + */ + async accountServiceSetPassword(requestParameters: AccountServiceSetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.accountServiceSetPasswordRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates an account. + */ + async accountServiceUpdateAccountRaw(requestParameters: AccountServiceUpdateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling accountServiceUpdateAccount().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling accountServiceUpdateAccount().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/accounts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesAccountsV1AccountToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAccountsV1AccountFromJSON(jsonValue)); + } + + /** + * Updates an account. + */ + async accountServiceUpdateAccount(requestParameters: AccountServiceUpdateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.accountServiceUpdateAccountRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/AliasServiceApi.ts b/e2e-tests/api-client/apis/AliasServiceApi.ts new file mode 100644 index 000000000..15a598de7 --- /dev/null +++ b/e2e-tests/api-client/apis/AliasServiceApi.ts @@ -0,0 +1,272 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesAliasesV1Alias, + ControllerApiServicesV1ListAliasesResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesAliasesV1AliasFromJSON, + ControllerApiResourcesAliasesV1AliasToJSON, + ControllerApiServicesV1ListAliasesResponseFromJSON, + ControllerApiServicesV1ListAliasesResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface AliasServiceCreateAliasRequest { + item: Omit; +} + +export interface AliasServiceDeleteAliasRequest { + id: string; +} + +export interface AliasServiceGetAliasRequest { + id: string; +} + +export interface AliasServiceListAliasesRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface AliasServiceUpdateAliasRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class AliasServiceApi extends runtime.BaseAPI { + + /** + * Creates a single Alias in the provided scope. + */ + async aliasServiceCreateAliasRaw(requestParameters: AliasServiceCreateAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling aliasServiceCreateAlias().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/aliases`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesAliasesV1AliasToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAliasesV1AliasFromJSON(jsonValue)); + } + + /** + * Creates a single Alias in the provided scope. + */ + async aliasServiceCreateAlias(requestParameters: AliasServiceCreateAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.aliasServiceCreateAliasRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes an Alias. + */ + async aliasServiceDeleteAliasRaw(requestParameters: AliasServiceDeleteAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling aliasServiceDeleteAlias().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/aliases/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes an Alias. + */ + async aliasServiceDeleteAlias(requestParameters: AliasServiceDeleteAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.aliasServiceDeleteAliasRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Alias. + */ + async aliasServiceGetAliasRaw(requestParameters: AliasServiceGetAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling aliasServiceGetAlias().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/aliases/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAliasesV1AliasFromJSON(jsonValue)); + } + + /** + * Gets a single Alias. + */ + async aliasServiceGetAlias(requestParameters: AliasServiceGetAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.aliasServiceGetAliasRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Aliases in a specific Scope. + */ + async aliasServiceListAliasesRaw(requestParameters: AliasServiceListAliasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/aliases`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListAliasesResponseFromJSON(jsonValue)); + } + + /** + * Lists all Aliases in a specific Scope. + */ + async aliasServiceListAliases(requestParameters: AliasServiceListAliasesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.aliasServiceListAliasesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates an Alias. + */ + async aliasServiceUpdateAliasRaw(requestParameters: AliasServiceUpdateAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling aliasServiceUpdateAlias().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling aliasServiceUpdateAlias().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/aliases/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesAliasesV1AliasToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAliasesV1AliasFromJSON(jsonValue)); + } + + /** + * Updates an Alias. + */ + async aliasServiceUpdateAlias(requestParameters: AliasServiceUpdateAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.aliasServiceUpdateAliasRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/AuthMethodServiceApi.ts b/e2e-tests/api-client/apis/AuthMethodServiceApi.ts new file mode 100644 index 000000000..f75a2e989 --- /dev/null +++ b/e2e-tests/api-client/apis/AuthMethodServiceApi.ts @@ -0,0 +1,385 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesAuthmethodsV1AuthMethod, + ControllerApiServicesV1AuthMethodServiceAuthenticateBody, + ControllerApiServicesV1AuthMethodServiceChangeStateBody, + ControllerApiServicesV1AuthenticateResponse, + ControllerApiServicesV1ListAuthMethodsResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSON, + ControllerApiServicesV1AuthMethodServiceAuthenticateBodyFromJSON, + ControllerApiServicesV1AuthMethodServiceAuthenticateBodyToJSON, + ControllerApiServicesV1AuthMethodServiceChangeStateBodyFromJSON, + ControllerApiServicesV1AuthMethodServiceChangeStateBodyToJSON, + ControllerApiServicesV1AuthenticateResponseFromJSON, + ControllerApiServicesV1AuthenticateResponseToJSON, + ControllerApiServicesV1ListAuthMethodsResponseFromJSON, + ControllerApiServicesV1ListAuthMethodsResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface AuthMethodServiceAuthenticateRequest { + authMethodId: string; + body: ControllerApiServicesV1AuthMethodServiceAuthenticateBody; +} + +export interface AuthMethodServiceChangeStateRequest { + id: string; + body: ControllerApiServicesV1AuthMethodServiceChangeStateBody; +} + +export interface AuthMethodServiceCreateAuthMethodRequest { + item: Omit; +} + +export interface AuthMethodServiceDeleteAuthMethodRequest { + id: string; +} + +export interface AuthMethodServiceGetAuthMethodRequest { + id: string; +} + +export interface AuthMethodServiceListAuthMethodsRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface AuthMethodServiceUpdateAuthMethodRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class AuthMethodServiceApi extends runtime.BaseAPI { + + /** + * Authenticate a user to an scope and retrieve an authentication token. + */ + async authMethodServiceAuthenticateRaw(requestParameters: AuthMethodServiceAuthenticateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['authMethodId'] == null) { + throw new runtime.RequiredError( + 'authMethodId', + 'Required parameter "authMethodId" was null or undefined when calling authMethodServiceAuthenticate().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling authMethodServiceAuthenticate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/auth-methods/{auth_method_id}:authenticate`.replace(`{${"auth_method_id"}}`, encodeURIComponent(String(requestParameters['authMethodId']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1AuthMethodServiceAuthenticateBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1AuthenticateResponseFromJSON(jsonValue)); + } + + /** + * Authenticate a user to an scope and retrieve an authentication token. + */ + async authMethodServiceAuthenticate(requestParameters: AuthMethodServiceAuthenticateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authMethodServiceAuthenticateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Changes the state of an OIDC AuthMethod + */ + async authMethodServiceChangeStateRaw(requestParameters: AuthMethodServiceChangeStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authMethodServiceChangeState().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling authMethodServiceChangeState().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/auth-methods/{id}:change-state`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1AuthMethodServiceChangeStateBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(jsonValue)); + } + + /** + * Changes the state of an OIDC AuthMethod + */ + async authMethodServiceChangeState(requestParameters: AuthMethodServiceChangeStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authMethodServiceChangeStateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a single auth method. + */ + async authMethodServiceCreateAuthMethodRaw(requestParameters: AuthMethodServiceCreateAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling authMethodServiceCreateAuthMethod().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/auth-methods`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesAuthmethodsV1AuthMethodToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(jsonValue)); + } + + /** + * Creates a single auth method. + */ + async authMethodServiceCreateAuthMethod(requestParameters: AuthMethodServiceCreateAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authMethodServiceCreateAuthMethodRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes an AuthMethod + */ + async authMethodServiceDeleteAuthMethodRaw(requestParameters: AuthMethodServiceDeleteAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authMethodServiceDeleteAuthMethod().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/auth-methods/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes an AuthMethod + */ + async authMethodServiceDeleteAuthMethod(requestParameters: AuthMethodServiceDeleteAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authMethodServiceDeleteAuthMethodRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single auth method. + */ + async authMethodServiceGetAuthMethodRaw(requestParameters: AuthMethodServiceGetAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authMethodServiceGetAuthMethod().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/auth-methods/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(jsonValue)); + } + + /** + * Gets a single auth method. + */ + async authMethodServiceGetAuthMethod(requestParameters: AuthMethodServiceGetAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authMethodServiceGetAuthMethodRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all auth methods. + */ + async authMethodServiceListAuthMethodsRaw(requestParameters: AuthMethodServiceListAuthMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/auth-methods`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListAuthMethodsResponseFromJSON(jsonValue)); + } + + /** + * Lists all auth methods. + */ + async authMethodServiceListAuthMethods(requestParameters: AuthMethodServiceListAuthMethodsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authMethodServiceListAuthMethodsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates an auth method. + */ + async authMethodServiceUpdateAuthMethodRaw(requestParameters: AuthMethodServiceUpdateAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authMethodServiceUpdateAuthMethod().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling authMethodServiceUpdateAuthMethod().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/auth-methods/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesAuthmethodsV1AuthMethodToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(jsonValue)); + } + + /** + * Updates an auth method. + */ + async authMethodServiceUpdateAuthMethod(requestParameters: AuthMethodServiceUpdateAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authMethodServiceUpdateAuthMethodRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/AuthTokenServiceApi.ts b/e2e-tests/api-client/apis/AuthTokenServiceApi.ts new file mode 100644 index 000000000..2e2efc727 --- /dev/null +++ b/e2e-tests/api-client/apis/AuthTokenServiceApi.ts @@ -0,0 +1,176 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesAuthtokensV1AuthToken, + ControllerApiServicesV1ListAuthTokensResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesAuthtokensV1AuthTokenFromJSON, + ControllerApiResourcesAuthtokensV1AuthTokenToJSON, + ControllerApiServicesV1ListAuthTokensResponseFromJSON, + ControllerApiServicesV1ListAuthTokensResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface AuthTokenServiceDeleteAuthTokenRequest { + id: string; +} + +export interface AuthTokenServiceGetAuthTokenRequest { + id: string; +} + +export interface AuthTokenServiceListAuthTokensRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +/** + * + */ +export class AuthTokenServiceApi extends runtime.BaseAPI { + + /** + * Deletes an Auth Token. + */ + async authTokenServiceDeleteAuthTokenRaw(requestParameters: AuthTokenServiceDeleteAuthTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authTokenServiceDeleteAuthToken().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/auth-tokens/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes an Auth Token. + */ + async authTokenServiceDeleteAuthToken(requestParameters: AuthTokenServiceDeleteAuthTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authTokenServiceDeleteAuthTokenRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Auth Token. + */ + async authTokenServiceGetAuthTokenRaw(requestParameters: AuthTokenServiceGetAuthTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling authTokenServiceGetAuthToken().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/auth-tokens/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAuthtokensV1AuthTokenFromJSON(jsonValue)); + } + + /** + * Gets a single Auth Token. + */ + async authTokenServiceGetAuthToken(requestParameters: AuthTokenServiceGetAuthTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authTokenServiceGetAuthTokenRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Auth Tokens. + */ + async authTokenServiceListAuthTokensRaw(requestParameters: AuthTokenServiceListAuthTokensRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/auth-tokens`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListAuthTokensResponseFromJSON(jsonValue)); + } + + /** + * Lists all Auth Tokens. + */ + async authTokenServiceListAuthTokens(requestParameters: AuthTokenServiceListAuthTokensRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.authTokenServiceListAuthTokensRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/BillingServiceApi.ts b/e2e-tests/api-client/apis/BillingServiceApi.ts new file mode 100644 index 000000000..b376e1d43 --- /dev/null +++ b/e2e-tests/api-client/apis/BillingServiceApi.ts @@ -0,0 +1,76 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiServicesV1MonthlyActiveUsersResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiServicesV1MonthlyActiveUsersResponseFromJSON, + ControllerApiServicesV1MonthlyActiveUsersResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface BillingServiceMonthlyActiveUsersRequest { + startTime?: string; + endTime?: string; +} + +/** + * + */ +export class BillingServiceApi extends runtime.BaseAPI { + + /** + * Returns monthly active users. + */ + async billingServiceMonthlyActiveUsersRaw(requestParameters: BillingServiceMonthlyActiveUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['startTime'] != null) { + queryParameters['start_time'] = requestParameters['startTime']; + } + + if (requestParameters['endTime'] != null) { + queryParameters['end_time'] = requestParameters['endTime']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/billing:monthly-active-users`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1MonthlyActiveUsersResponseFromJSON(jsonValue)); + } + + /** + * Returns monthly active users. + */ + async billingServiceMonthlyActiveUsers(requestParameters: BillingServiceMonthlyActiveUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.billingServiceMonthlyActiveUsersRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/CredentialLibraryServiceApi.ts b/e2e-tests/api-client/apis/CredentialLibraryServiceApi.ts new file mode 100644 index 000000000..7dda15205 --- /dev/null +++ b/e2e-tests/api-client/apis/CredentialLibraryServiceApi.ts @@ -0,0 +1,267 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesCredentiallibrariesV1CredentialLibrary, + ControllerApiServicesV1ListCredentialLibrariesResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON, + ControllerApiServicesV1ListCredentialLibrariesResponseFromJSON, + ControllerApiServicesV1ListCredentialLibrariesResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface CredentialLibraryServiceCreateCredentialLibraryRequest { + item: Omit; +} + +export interface CredentialLibraryServiceDeleteCredentialLibraryRequest { + id: string; +} + +export interface CredentialLibraryServiceGetCredentialLibraryRequest { + id: string; +} + +export interface CredentialLibraryServiceListCredentialLibrariesRequest { + credentialStoreId?: string; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface CredentialLibraryServiceUpdateCredentialLibraryRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class CredentialLibraryServiceApi extends runtime.BaseAPI { + + /** + * Creates a single Credential Library. + */ + async credentialLibraryServiceCreateCredentialLibraryRaw(requestParameters: CredentialLibraryServiceCreateCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling credentialLibraryServiceCreateCredentialLibrary().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credential-libraries`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(jsonValue)); + } + + /** + * Creates a single Credential Library. + */ + async credentialLibraryServiceCreateCredentialLibrary(requestParameters: CredentialLibraryServiceCreateCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialLibraryServiceCreateCredentialLibraryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a Credential Library + */ + async credentialLibraryServiceDeleteCredentialLibraryRaw(requestParameters: CredentialLibraryServiceDeleteCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling credentialLibraryServiceDeleteCredentialLibrary().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credential-libraries/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a Credential Library + */ + async credentialLibraryServiceDeleteCredentialLibrary(requestParameters: CredentialLibraryServiceDeleteCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialLibraryServiceDeleteCredentialLibraryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Credential Library. + */ + async credentialLibraryServiceGetCredentialLibraryRaw(requestParameters: CredentialLibraryServiceGetCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling credentialLibraryServiceGetCredentialLibrary().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credential-libraries/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(jsonValue)); + } + + /** + * Gets a single Credential Library. + */ + async credentialLibraryServiceGetCredentialLibrary(requestParameters: CredentialLibraryServiceGetCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialLibraryServiceGetCredentialLibraryRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Credential Library. + */ + async credentialLibraryServiceListCredentialLibrariesRaw(requestParameters: CredentialLibraryServiceListCredentialLibrariesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['credentialStoreId'] != null) { + queryParameters['credential_store_id'] = requestParameters['credentialStoreId']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credential-libraries`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListCredentialLibrariesResponseFromJSON(jsonValue)); + } + + /** + * Lists all Credential Library. + */ + async credentialLibraryServiceListCredentialLibraries(requestParameters: CredentialLibraryServiceListCredentialLibrariesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialLibraryServiceListCredentialLibrariesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a Credential Library. + */ + async credentialLibraryServiceUpdateCredentialLibraryRaw(requestParameters: CredentialLibraryServiceUpdateCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling credentialLibraryServiceUpdateCredentialLibrary().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling credentialLibraryServiceUpdateCredentialLibrary().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credential-libraries/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(jsonValue)); + } + + /** + * Updates a Credential Library. + */ + async credentialLibraryServiceUpdateCredentialLibrary(requestParameters: CredentialLibraryServiceUpdateCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialLibraryServiceUpdateCredentialLibraryRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/CredentialServiceApi.ts b/e2e-tests/api-client/apis/CredentialServiceApi.ts new file mode 100644 index 000000000..2b0618256 --- /dev/null +++ b/e2e-tests/api-client/apis/CredentialServiceApi.ts @@ -0,0 +1,267 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesCredentialsV1Credential, + ControllerApiServicesV1ListCredentialsResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesCredentialsV1CredentialFromJSON, + ControllerApiResourcesCredentialsV1CredentialToJSON, + ControllerApiServicesV1ListCredentialsResponseFromJSON, + ControllerApiServicesV1ListCredentialsResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface CredentialServiceCreateCredentialRequest { + item: Omit; +} + +export interface CredentialServiceDeleteCredentialRequest { + id: string; +} + +export interface CredentialServiceGetCredentialRequest { + id: string; +} + +export interface CredentialServiceListCredentialsRequest { + credentialStoreId?: string; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface CredentialServiceUpdateCredentialRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class CredentialServiceApi extends runtime.BaseAPI { + + /** + * Creates a single Credential. + */ + async credentialServiceCreateCredentialRaw(requestParameters: CredentialServiceCreateCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling credentialServiceCreateCredential().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credentials`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesCredentialsV1CredentialToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialsV1CredentialFromJSON(jsonValue)); + } + + /** + * Creates a single Credential. + */ + async credentialServiceCreateCredential(requestParameters: CredentialServiceCreateCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialServiceCreateCredentialRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a Credential + */ + async credentialServiceDeleteCredentialRaw(requestParameters: CredentialServiceDeleteCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling credentialServiceDeleteCredential().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credentials/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a Credential + */ + async credentialServiceDeleteCredential(requestParameters: CredentialServiceDeleteCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialServiceDeleteCredentialRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Credential. + */ + async credentialServiceGetCredentialRaw(requestParameters: CredentialServiceGetCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling credentialServiceGetCredential().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credentials/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialsV1CredentialFromJSON(jsonValue)); + } + + /** + * Gets a single Credential. + */ + async credentialServiceGetCredential(requestParameters: CredentialServiceGetCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialServiceGetCredentialRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Credentials. + */ + async credentialServiceListCredentialsRaw(requestParameters: CredentialServiceListCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['credentialStoreId'] != null) { + queryParameters['credential_store_id'] = requestParameters['credentialStoreId']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credentials`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListCredentialsResponseFromJSON(jsonValue)); + } + + /** + * Lists all Credentials. + */ + async credentialServiceListCredentials(requestParameters: CredentialServiceListCredentialsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialServiceListCredentialsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a Credential. + */ + async credentialServiceUpdateCredentialRaw(requestParameters: CredentialServiceUpdateCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling credentialServiceUpdateCredential().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling credentialServiceUpdateCredential().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credentials/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesCredentialsV1CredentialToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialsV1CredentialFromJSON(jsonValue)); + } + + /** + * Updates a Credential. + */ + async credentialServiceUpdateCredential(requestParameters: CredentialServiceUpdateCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialServiceUpdateCredentialRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/CredentialStoreServiceApi.ts b/e2e-tests/api-client/apis/CredentialStoreServiceApi.ts new file mode 100644 index 000000000..4aecbb4a1 --- /dev/null +++ b/e2e-tests/api-client/apis/CredentialStoreServiceApi.ts @@ -0,0 +1,272 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesCredentialstoresV1CredentialStore, + ControllerApiServicesV1ListCredentialStoresResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON, + ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON, + ControllerApiServicesV1ListCredentialStoresResponseFromJSON, + ControllerApiServicesV1ListCredentialStoresResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface CredentialStoreServiceCreateCredentialStoreRequest { + item: Omit; +} + +export interface CredentialStoreServiceDeleteCredentialStoreRequest { + id: string; +} + +export interface CredentialStoreServiceGetCredentialStoreRequest { + id: string; +} + +export interface CredentialStoreServiceListCredentialStoresRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface CredentialStoreServiceUpdateCredentialStoreRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class CredentialStoreServiceApi extends runtime.BaseAPI { + + /** + * Creates a single Credential Store. + */ + async credentialStoreServiceCreateCredentialStoreRaw(requestParameters: CredentialStoreServiceCreateCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling credentialStoreServiceCreateCredentialStore().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credential-stores`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(jsonValue)); + } + + /** + * Creates a single Credential Store. + */ + async credentialStoreServiceCreateCredentialStore(requestParameters: CredentialStoreServiceCreateCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialStoreServiceCreateCredentialStoreRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a CredentialStore + */ + async credentialStoreServiceDeleteCredentialStoreRaw(requestParameters: CredentialStoreServiceDeleteCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling credentialStoreServiceDeleteCredentialStore().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credential-stores/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a CredentialStore + */ + async credentialStoreServiceDeleteCredentialStore(requestParameters: CredentialStoreServiceDeleteCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialStoreServiceDeleteCredentialStoreRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Credential Store. + */ + async credentialStoreServiceGetCredentialStoreRaw(requestParameters: CredentialStoreServiceGetCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling credentialStoreServiceGetCredentialStore().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credential-stores/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(jsonValue)); + } + + /** + * Gets a single Credential Store. + */ + async credentialStoreServiceGetCredentialStore(requestParameters: CredentialStoreServiceGetCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialStoreServiceGetCredentialStoreRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Credential Stores. + */ + async credentialStoreServiceListCredentialStoresRaw(requestParameters: CredentialStoreServiceListCredentialStoresRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credential-stores`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListCredentialStoresResponseFromJSON(jsonValue)); + } + + /** + * Lists all Credential Stores. + */ + async credentialStoreServiceListCredentialStores(requestParameters: CredentialStoreServiceListCredentialStoresRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialStoreServiceListCredentialStoresRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a Credential Store. + */ + async credentialStoreServiceUpdateCredentialStoreRaw(requestParameters: CredentialStoreServiceUpdateCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling credentialStoreServiceUpdateCredentialStore().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling credentialStoreServiceUpdateCredentialStore().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/credential-stores/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(jsonValue)); + } + + /** + * Updates a Credential Store. + */ + async credentialStoreServiceUpdateCredentialStore(requestParameters: CredentialStoreServiceUpdateCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.credentialStoreServiceUpdateCredentialStoreRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/GroupServiceApi.ts b/e2e-tests/api-client/apis/GroupServiceApi.ts new file mode 100644 index 000000000..a1e0d4b74 --- /dev/null +++ b/e2e-tests/api-client/apis/GroupServiceApi.ts @@ -0,0 +1,437 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesGroupsV1Group, + ControllerApiServicesV1GroupServiceAddGroupMembersBody, + ControllerApiServicesV1GroupServiceRemoveGroupMembersBody, + ControllerApiServicesV1GroupServiceSetGroupMembersBody, + ControllerApiServicesV1ListGroupsResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesGroupsV1GroupFromJSON, + ControllerApiResourcesGroupsV1GroupToJSON, + ControllerApiServicesV1GroupServiceAddGroupMembersBodyFromJSON, + ControllerApiServicesV1GroupServiceAddGroupMembersBodyToJSON, + ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyFromJSON, + ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyToJSON, + ControllerApiServicesV1GroupServiceSetGroupMembersBodyFromJSON, + ControllerApiServicesV1GroupServiceSetGroupMembersBodyToJSON, + ControllerApiServicesV1ListGroupsResponseFromJSON, + ControllerApiServicesV1ListGroupsResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface GroupServiceAddGroupMembersRequest { + id: string; + body: ControllerApiServicesV1GroupServiceAddGroupMembersBody; +} + +export interface GroupServiceCreateGroupRequest { + item: Omit; +} + +export interface GroupServiceDeleteGroupRequest { + id: string; +} + +export interface GroupServiceGetGroupRequest { + id: string; +} + +export interface GroupServiceListGroupsRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface GroupServiceRemoveGroupMembersRequest { + id: string; + body: ControllerApiServicesV1GroupServiceRemoveGroupMembersBody; +} + +export interface GroupServiceSetGroupMembersRequest { + id: string; + body: ControllerApiServicesV1GroupServiceSetGroupMembersBody; +} + +export interface GroupServiceUpdateGroupRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class GroupServiceApi extends runtime.BaseAPI { + + /** + * Adds members to a Group. + */ + async groupServiceAddGroupMembersRaw(requestParameters: GroupServiceAddGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling groupServiceAddGroupMembers().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling groupServiceAddGroupMembers().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/groups/{id}:add-members`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1GroupServiceAddGroupMembersBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue)); + } + + /** + * Adds members to a Group. + */ + async groupServiceAddGroupMembers(requestParameters: GroupServiceAddGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.groupServiceAddGroupMembersRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a single Group. + */ + async groupServiceCreateGroupRaw(requestParameters: GroupServiceCreateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling groupServiceCreateGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/groups`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesGroupsV1GroupToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue)); + } + + /** + * Creates a single Group. + */ + async groupServiceCreateGroup(requestParameters: GroupServiceCreateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.groupServiceCreateGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a Group. + */ + async groupServiceDeleteGroupRaw(requestParameters: GroupServiceDeleteGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling groupServiceDeleteGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a Group. + */ + async groupServiceDeleteGroup(requestParameters: GroupServiceDeleteGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.groupServiceDeleteGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Group. + */ + async groupServiceGetGroupRaw(requestParameters: GroupServiceGetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling groupServiceGetGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue)); + } + + /** + * Gets a single Group. + */ + async groupServiceGetGroup(requestParameters: GroupServiceGetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.groupServiceGetGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Groups. + */ + async groupServiceListGroupsRaw(requestParameters: GroupServiceListGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/groups`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListGroupsResponseFromJSON(jsonValue)); + } + + /** + * Lists all Groups. + */ + async groupServiceListGroups(requestParameters: GroupServiceListGroupsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.groupServiceListGroupsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Removes the specified members from a Group. + */ + async groupServiceRemoveGroupMembersRaw(requestParameters: GroupServiceRemoveGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling groupServiceRemoveGroupMembers().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling groupServiceRemoveGroupMembers().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/groups/{id}:remove-members`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue)); + } + + /** + * Removes the specified members from a Group. + */ + async groupServiceRemoveGroupMembers(requestParameters: GroupServiceRemoveGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.groupServiceRemoveGroupMembersRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Set a Group\'s members to exactly the list of provided in the request, removing any members that are not specified. + */ + async groupServiceSetGroupMembersRaw(requestParameters: GroupServiceSetGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling groupServiceSetGroupMembers().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling groupServiceSetGroupMembers().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/groups/{id}:set-members`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1GroupServiceSetGroupMembersBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue)); + } + + /** + * Set a Group\'s members to exactly the list of provided in the request, removing any members that are not specified. + */ + async groupServiceSetGroupMembers(requestParameters: GroupServiceSetGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.groupServiceSetGroupMembersRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a Group. + */ + async groupServiceUpdateGroupRaw(requestParameters: GroupServiceUpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling groupServiceUpdateGroup().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling groupServiceUpdateGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesGroupsV1GroupToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue)); + } + + /** + * Updates a Group. + */ + async groupServiceUpdateGroup(requestParameters: GroupServiceUpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.groupServiceUpdateGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/HostCatalogServiceApi.ts b/e2e-tests/api-client/apis/HostCatalogServiceApi.ts new file mode 100644 index 000000000..9d3660278 --- /dev/null +++ b/e2e-tests/api-client/apis/HostCatalogServiceApi.ts @@ -0,0 +1,277 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesHostcatalogsV1HostCatalog, + ControllerApiServicesV1ListHostCatalogsResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON, + ControllerApiResourcesHostcatalogsV1HostCatalogToJSON, + ControllerApiServicesV1ListHostCatalogsResponseFromJSON, + ControllerApiServicesV1ListHostCatalogsResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface HostCatalogServiceCreateHostCatalogRequest { + item: Omit; + pluginName?: string; +} + +export interface HostCatalogServiceDeleteHostCatalogRequest { + id: string; +} + +export interface HostCatalogServiceGetHostCatalogRequest { + id: string; +} + +export interface HostCatalogServiceListHostCatalogsRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface HostCatalogServiceUpdateHostCatalogRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class HostCatalogServiceApi extends runtime.BaseAPI { + + /** + * Creates a Host Catalog + */ + async hostCatalogServiceCreateHostCatalogRaw(requestParameters: HostCatalogServiceCreateHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling hostCatalogServiceCreateHostCatalog().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['pluginName'] != null) { + queryParameters['plugin_name'] = requestParameters['pluginName']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-catalogs`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesHostcatalogsV1HostCatalogToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(jsonValue)); + } + + /** + * Creates a Host Catalog + */ + async hostCatalogServiceCreateHostCatalog(requestParameters: HostCatalogServiceCreateHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostCatalogServiceCreateHostCatalogRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a Host Catalog + */ + async hostCatalogServiceDeleteHostCatalogRaw(requestParameters: HostCatalogServiceDeleteHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostCatalogServiceDeleteHostCatalog().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-catalogs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a Host Catalog + */ + async hostCatalogServiceDeleteHostCatalog(requestParameters: HostCatalogServiceDeleteHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostCatalogServiceDeleteHostCatalogRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Host Catalog. + */ + async hostCatalogServiceGetHostCatalogRaw(requestParameters: HostCatalogServiceGetHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostCatalogServiceGetHostCatalog().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-catalogs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(jsonValue)); + } + + /** + * Gets a single Host Catalog. + */ + async hostCatalogServiceGetHostCatalog(requestParameters: HostCatalogServiceGetHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostCatalogServiceGetHostCatalogRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a list of Host Catalogs. + */ + async hostCatalogServiceListHostCatalogsRaw(requestParameters: HostCatalogServiceListHostCatalogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-catalogs`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListHostCatalogsResponseFromJSON(jsonValue)); + } + + /** + * Gets a list of Host Catalogs. + */ + async hostCatalogServiceListHostCatalogs(requestParameters: HostCatalogServiceListHostCatalogsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostCatalogServiceListHostCatalogsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a Host Catalog + */ + async hostCatalogServiceUpdateHostCatalogRaw(requestParameters: HostCatalogServiceUpdateHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostCatalogServiceUpdateHostCatalog().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling hostCatalogServiceUpdateHostCatalog().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-catalogs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesHostcatalogsV1HostCatalogToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(jsonValue)); + } + + /** + * Updates a Host Catalog + */ + async hostCatalogServiceUpdateHostCatalog(requestParameters: HostCatalogServiceUpdateHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostCatalogServiceUpdateHostCatalogRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/HostServiceApi.ts b/e2e-tests/api-client/apis/HostServiceApi.ts new file mode 100644 index 000000000..a29514d5e --- /dev/null +++ b/e2e-tests/api-client/apis/HostServiceApi.ts @@ -0,0 +1,267 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesHostsV1Host, + ControllerApiServicesV1ListHostsResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesHostsV1HostFromJSON, + ControllerApiResourcesHostsV1HostToJSON, + ControllerApiServicesV1ListHostsResponseFromJSON, + ControllerApiServicesV1ListHostsResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface HostServiceCreateHostRequest { + item: Omit; +} + +export interface HostServiceDeleteHostRequest { + id: string; +} + +export interface HostServiceGetHostRequest { + id: string; +} + +export interface HostServiceListHostsRequest { + hostCatalogId?: string; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface HostServiceUpdateHostRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class HostServiceApi extends runtime.BaseAPI { + + /** + * Create a single Host. + */ + async hostServiceCreateHostRaw(requestParameters: HostServiceCreateHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling hostServiceCreateHost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/hosts`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesHostsV1HostToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsV1HostFromJSON(jsonValue)); + } + + /** + * Create a single Host. + */ + async hostServiceCreateHost(requestParameters: HostServiceCreateHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostServiceCreateHostRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a Host. + */ + async hostServiceDeleteHostRaw(requestParameters: HostServiceDeleteHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostServiceDeleteHost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/hosts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Delete a Host. + */ + async hostServiceDeleteHost(requestParameters: HostServiceDeleteHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostServiceDeleteHostRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Host. + */ + async hostServiceGetHostRaw(requestParameters: HostServiceGetHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostServiceGetHost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/hosts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsV1HostFromJSON(jsonValue)); + } + + /** + * Gets a single Host. + */ + async hostServiceGetHost(requestParameters: HostServiceGetHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostServiceGetHostRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List all Hosts for the specified Catalog. + */ + async hostServiceListHostsRaw(requestParameters: HostServiceListHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['hostCatalogId'] != null) { + queryParameters['host_catalog_id'] = requestParameters['hostCatalogId']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/hosts`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListHostsResponseFromJSON(jsonValue)); + } + + /** + * List all Hosts for the specified Catalog. + */ + async hostServiceListHosts(requestParameters: HostServiceListHostsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostServiceListHostsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a Host. + */ + async hostServiceUpdateHostRaw(requestParameters: HostServiceUpdateHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostServiceUpdateHost().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling hostServiceUpdateHost().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/hosts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesHostsV1HostToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsV1HostFromJSON(jsonValue)); + } + + /** + * Update a Host. + */ + async hostServiceUpdateHost(requestParameters: HostServiceUpdateHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostServiceUpdateHostRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/HostSetServiceApi.ts b/e2e-tests/api-client/apis/HostSetServiceApi.ts new file mode 100644 index 000000000..000d38410 --- /dev/null +++ b/e2e-tests/api-client/apis/HostSetServiceApi.ts @@ -0,0 +1,432 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesHostsetsV1HostSet, + ControllerApiServicesV1HostSetServiceAddHostSetHostsBody, + ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody, + ControllerApiServicesV1HostSetServiceSetHostSetHostsBody, + ControllerApiServicesV1ListHostSetsResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesHostsetsV1HostSetFromJSON, + ControllerApiResourcesHostsetsV1HostSetToJSON, + ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyFromJSON, + ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyToJSON, + ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyFromJSON, + ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyToJSON, + ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyFromJSON, + ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyToJSON, + ControllerApiServicesV1ListHostSetsResponseFromJSON, + ControllerApiServicesV1ListHostSetsResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface HostSetServiceAddHostSetHostsRequest { + id: string; + body: ControllerApiServicesV1HostSetServiceAddHostSetHostsBody; +} + +export interface HostSetServiceCreateHostSetRequest { + item: Omit; +} + +export interface HostSetServiceDeleteHostSetRequest { + id: string; +} + +export interface HostSetServiceGetHostSetRequest { + id: string; +} + +export interface HostSetServiceListHostSetsRequest { + hostCatalogId?: string; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface HostSetServiceRemoveHostSetHostsRequest { + id: string; + body: ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody; +} + +export interface HostSetServiceSetHostSetHostsRequest { + id: string; + body: ControllerApiServicesV1HostSetServiceSetHostSetHostsBody; +} + +export interface HostSetServiceUpdateHostSetRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class HostSetServiceApi extends runtime.BaseAPI { + + /** + * Adds existing Hosts to a Host Set. + */ + async hostSetServiceAddHostSetHostsRaw(requestParameters: HostSetServiceAddHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostSetServiceAddHostSetHosts().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling hostSetServiceAddHostSetHosts().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-sets/{id}:add-hosts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue)); + } + + /** + * Adds existing Hosts to a Host Set. + */ + async hostSetServiceAddHostSetHosts(requestParameters: HostSetServiceAddHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostSetServiceAddHostSetHostsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Create a Host Set. + */ + async hostSetServiceCreateHostSetRaw(requestParameters: HostSetServiceCreateHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling hostSetServiceCreateHostSet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-sets`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesHostsetsV1HostSetToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue)); + } + + /** + * Create a Host Set. + */ + async hostSetServiceCreateHostSet(requestParameters: HostSetServiceCreateHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostSetServiceCreateHostSetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Delete a Host Set. + */ + async hostSetServiceDeleteHostSetRaw(requestParameters: HostSetServiceDeleteHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostSetServiceDeleteHostSet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-sets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Delete a Host Set. + */ + async hostSetServiceDeleteHostSet(requestParameters: HostSetServiceDeleteHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostSetServiceDeleteHostSetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Get a single Host Set. + */ + async hostSetServiceGetHostSetRaw(requestParameters: HostSetServiceGetHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostSetServiceGetHostSet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-sets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue)); + } + + /** + * Get a single Host Set. + */ + async hostSetServiceGetHostSet(requestParameters: HostSetServiceGetHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostSetServiceGetHostSetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List all Host Sets under the specific Catalog. + */ + async hostSetServiceListHostSetsRaw(requestParameters: HostSetServiceListHostSetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['hostCatalogId'] != null) { + queryParameters['host_catalog_id'] = requestParameters['hostCatalogId']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-sets`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListHostSetsResponseFromJSON(jsonValue)); + } + + /** + * List all Host Sets under the specific Catalog. + */ + async hostSetServiceListHostSets(requestParameters: HostSetServiceListHostSetsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostSetServiceListHostSetsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Removes Hosts from the Host Set. + */ + async hostSetServiceRemoveHostSetHostsRaw(requestParameters: HostSetServiceRemoveHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostSetServiceRemoveHostSetHosts().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling hostSetServiceRemoveHostSetHosts().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-sets/{id}:remove-hosts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue)); + } + + /** + * Removes Hosts from the Host Set. + */ + async hostSetServiceRemoveHostSetHosts(requestParameters: HostSetServiceRemoveHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostSetServiceRemoveHostSetHostsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Sets the Hosts on the Host Set. + */ + async hostSetServiceSetHostSetHostsRaw(requestParameters: HostSetServiceSetHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostSetServiceSetHostSetHosts().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling hostSetServiceSetHostSetHosts().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-sets/{id}:set-hosts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue)); + } + + /** + * Sets the Hosts on the Host Set. + */ + async hostSetServiceSetHostSetHosts(requestParameters: HostSetServiceSetHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostSetServiceSetHostSetHostsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Update a Host Set. + */ + async hostSetServiceUpdateHostSetRaw(requestParameters: HostSetServiceUpdateHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling hostSetServiceUpdateHostSet().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling hostSetServiceUpdateHostSet().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/host-sets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesHostsetsV1HostSetToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue)); + } + + /** + * Update a Host Set. + */ + async hostSetServiceUpdateHostSet(requestParameters: HostSetServiceUpdateHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.hostSetServiceUpdateHostSetRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/ManagedGroupServiceApi.ts b/e2e-tests/api-client/apis/ManagedGroupServiceApi.ts new file mode 100644 index 000000000..1d5e7a9c8 --- /dev/null +++ b/e2e-tests/api-client/apis/ManagedGroupServiceApi.ts @@ -0,0 +1,267 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesManagedgroupsV1ManagedGroup, + ControllerApiServicesV1ListManagedGroupsResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON, + ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON, + ControllerApiServicesV1ListManagedGroupsResponseFromJSON, + ControllerApiServicesV1ListManagedGroupsResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface ManagedGroupServiceCreateManagedGroupRequest { + item: Omit; +} + +export interface ManagedGroupServiceDeleteManagedGroupRequest { + id: string; +} + +export interface ManagedGroupServiceGetManagedGroupRequest { + id: string; +} + +export interface ManagedGroupServiceListManagedGroupsRequest { + authMethodId?: string; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface ManagedGroupServiceUpdateManagedGroupRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class ManagedGroupServiceApi extends runtime.BaseAPI { + + /** + * Creates a single ManagedGroup in the provided Auth Method. + */ + async managedGroupServiceCreateManagedGroupRaw(requestParameters: ManagedGroupServiceCreateManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling managedGroupServiceCreateManagedGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/managed-groups`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(jsonValue)); + } + + /** + * Creates a single ManagedGroup in the provided Auth Method. + */ + async managedGroupServiceCreateManagedGroup(requestParameters: ManagedGroupServiceCreateManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedGroupServiceCreateManagedGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a ManagedGroup. + */ + async managedGroupServiceDeleteManagedGroupRaw(requestParameters: ManagedGroupServiceDeleteManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling managedGroupServiceDeleteManagedGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/managed-groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a ManagedGroup. + */ + async managedGroupServiceDeleteManagedGroup(requestParameters: ManagedGroupServiceDeleteManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedGroupServiceDeleteManagedGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single ManagedGroup. + */ + async managedGroupServiceGetManagedGroupRaw(requestParameters: ManagedGroupServiceGetManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling managedGroupServiceGetManagedGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/managed-groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(jsonValue)); + } + + /** + * Gets a single ManagedGroup. + */ + async managedGroupServiceGetManagedGroup(requestParameters: ManagedGroupServiceGetManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedGroupServiceGetManagedGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all ManagedGroups in a specific Auth Method. + */ + async managedGroupServiceListManagedGroupsRaw(requestParameters: ManagedGroupServiceListManagedGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['authMethodId'] != null) { + queryParameters['auth_method_id'] = requestParameters['authMethodId']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/managed-groups`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListManagedGroupsResponseFromJSON(jsonValue)); + } + + /** + * Lists all ManagedGroups in a specific Auth Method. + */ + async managedGroupServiceListManagedGroups(requestParameters: ManagedGroupServiceListManagedGroupsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedGroupServiceListManagedGroupsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a ManagedGroup. + */ + async managedGroupServiceUpdateManagedGroupRaw(requestParameters: ManagedGroupServiceUpdateManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling managedGroupServiceUpdateManagedGroup().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling managedGroupServiceUpdateManagedGroup().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/managed-groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(jsonValue)); + } + + /** + * Updates a ManagedGroup. + */ + async managedGroupServiceUpdateManagedGroup(requestParameters: ManagedGroupServiceUpdateManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.managedGroupServiceUpdateManagedGroupRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/PolicyServiceApi.ts b/e2e-tests/api-client/apis/PolicyServiceApi.ts new file mode 100644 index 000000000..3c175c864 --- /dev/null +++ b/e2e-tests/api-client/apis/PolicyServiceApi.ts @@ -0,0 +1,272 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesPoliciesV1Policy, + ControllerApiServicesV1ListPoliciesResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesPoliciesV1PolicyFromJSON, + ControllerApiResourcesPoliciesV1PolicyToJSON, + ControllerApiServicesV1ListPoliciesResponseFromJSON, + ControllerApiServicesV1ListPoliciesResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface PolicyServiceCreatePolicyRequest { + item: Omit; +} + +export interface PolicyServiceDeletePolicyRequest { + id: string; +} + +export interface PolicyServiceGetPolicyRequest { + id: string; +} + +export interface PolicyServiceListPoliciesRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface PolicyServiceUpdatePolicyRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class PolicyServiceApi extends runtime.BaseAPI { + + /** + * Creates a single policy. + */ + async policyServiceCreatePolicyRaw(requestParameters: PolicyServiceCreatePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling policyServiceCreatePolicy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/policies`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesPoliciesV1PolicyToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesPoliciesV1PolicyFromJSON(jsonValue)); + } + + /** + * Creates a single policy. + */ + async policyServiceCreatePolicy(requestParameters: PolicyServiceCreatePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policyServiceCreatePolicyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes an existing policy. + */ + async policyServiceDeletePolicyRaw(requestParameters: PolicyServiceDeletePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling policyServiceDeletePolicy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/policies/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes an existing policy. + */ + async policyServiceDeletePolicy(requestParameters: PolicyServiceDeletePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policyServiceDeletePolicyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single policy with the given id. + */ + async policyServiceGetPolicyRaw(requestParameters: PolicyServiceGetPolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling policyServiceGetPolicy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/policies/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesPoliciesV1PolicyFromJSON(jsonValue)); + } + + /** + * Gets a single policy with the given id. + */ + async policyServiceGetPolicy(requestParameters: PolicyServiceGetPolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policyServiceGetPolicyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all policies. + */ + async policyServiceListPoliciesRaw(requestParameters: PolicyServiceListPoliciesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/policies`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListPoliciesResponseFromJSON(jsonValue)); + } + + /** + * Lists all policies. + */ + async policyServiceListPolicies(requestParameters: PolicyServiceListPoliciesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policyServiceListPoliciesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates an existing policy. + */ + async policyServiceUpdatePolicyRaw(requestParameters: PolicyServiceUpdatePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling policyServiceUpdatePolicy().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling policyServiceUpdatePolicy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/policies/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesPoliciesV1PolicyToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesPoliciesV1PolicyFromJSON(jsonValue)); + } + + /** + * Updates an existing policy. + */ + async policyServiceUpdatePolicy(requestParameters: PolicyServiceUpdatePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.policyServiceUpdatePolicyRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/RoleServiceApi.ts b/e2e-tests/api-client/apis/RoleServiceApi.ts new file mode 100644 index 000000000..36ed8e9f1 --- /dev/null +++ b/e2e-tests/api-client/apis/RoleServiceApi.ts @@ -0,0 +1,767 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesRolesV1Role, + ControllerApiServicesV1ListRolesResponse, + ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody, + ControllerApiServicesV1RoleServiceAddRoleGrantsBody, + ControllerApiServicesV1RoleServiceAddRolePrincipalsBody, + ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody, + ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody, + ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody, + ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody, + ControllerApiServicesV1RoleServiceSetRoleGrantsBody, + ControllerApiServicesV1RoleServiceSetRolePrincipalsBody, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiServicesV1ListRolesResponseFromJSON, + ControllerApiServicesV1ListRolesResponseToJSON, + ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyFromJSON, + ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyToJSON, + ControllerApiServicesV1RoleServiceAddRoleGrantsBodyFromJSON, + ControllerApiServicesV1RoleServiceAddRoleGrantsBodyToJSON, + ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyFromJSON, + ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyToJSON, + ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyFromJSON, + ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyToJSON, + ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyFromJSON, + ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyToJSON, + ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyFromJSON, + ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyToJSON, + ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyFromJSON, + ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyToJSON, + ControllerApiServicesV1RoleServiceSetRoleGrantsBodyFromJSON, + ControllerApiServicesV1RoleServiceSetRoleGrantsBodyToJSON, + ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyFromJSON, + ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface RoleServiceAddRoleGrantScopesRequest { + id: string; + body: ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody; +} + +export interface RoleServiceAddRoleGrantsRequest { + id: string; + body: ControllerApiServicesV1RoleServiceAddRoleGrantsBody; +} + +export interface RoleServiceAddRolePrincipalsRequest { + id: string; + body: ControllerApiServicesV1RoleServiceAddRolePrincipalsBody; +} + +export interface RoleServiceCreateRoleRequest { + item: Omit; +} + +export interface RoleServiceDeleteRoleRequest { + id: string; +} + +export interface RoleServiceGetRoleRequest { + id: string; +} + +export interface RoleServiceListRolesRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface RoleServiceRemoveRoleGrantScopesRequest { + id: string; + body: ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody; +} + +export interface RoleServiceRemoveRoleGrantsRequest { + id: string; + body: ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody; +} + +export interface RoleServiceRemoveRolePrincipalsRequest { + id: string; + body: ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody; +} + +export interface RoleServiceSetRoleGrantScopesRequest { + id: string; + body: ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody; +} + +export interface RoleServiceSetRoleGrantsRequest { + id: string; + body: ControllerApiServicesV1RoleServiceSetRoleGrantsBody; +} + +export interface RoleServiceSetRolePrincipalsRequest { + id: string; + body: ControllerApiServicesV1RoleServiceSetRolePrincipalsBody; +} + +export interface RoleServiceUpdateRoleRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class RoleServiceApi extends runtime.BaseAPI { + + /** + * Adds grant scopes to a Role + */ + async roleServiceAddRoleGrantScopesRaw(requestParameters: RoleServiceAddRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceAddRoleGrantScopes().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling roleServiceAddRoleGrantScopes().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}:add-grant-scopes`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Adds grant scopes to a Role + */ + async roleServiceAddRoleGrantScopes(requestParameters: RoleServiceAddRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceAddRoleGrantScopesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Adds grants to a Role + */ + async roleServiceAddRoleGrantsRaw(requestParameters: RoleServiceAddRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceAddRoleGrants().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling roleServiceAddRoleGrants().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}:add-grants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1RoleServiceAddRoleGrantsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Adds grants to a Role + */ + async roleServiceAddRoleGrants(requestParameters: RoleServiceAddRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceAddRoleGrantsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Adds Users and/or Groups to a Role. + */ + async roleServiceAddRolePrincipalsRaw(requestParameters: RoleServiceAddRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceAddRolePrincipals().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling roleServiceAddRolePrincipals().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}:add-principals`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Adds Users and/or Groups to a Role. + */ + async roleServiceAddRolePrincipals(requestParameters: RoleServiceAddRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceAddRolePrincipalsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a single Role. + */ + async roleServiceCreateRoleRaw(requestParameters: RoleServiceCreateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling roleServiceCreateRole().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesRolesV1RoleToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Creates a single Role. + */ + async roleServiceCreateRole(requestParameters: RoleServiceCreateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceCreateRoleRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a Role. + */ + async roleServiceDeleteRoleRaw(requestParameters: RoleServiceDeleteRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceDeleteRole().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a Role. + */ + async roleServiceDeleteRole(requestParameters: RoleServiceDeleteRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceDeleteRoleRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Role. + */ + async roleServiceGetRoleRaw(requestParameters: RoleServiceGetRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceGetRole().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Gets a single Role. + */ + async roleServiceGetRole(requestParameters: RoleServiceGetRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceGetRoleRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Roles. + */ + async roleServiceListRolesRaw(requestParameters: RoleServiceListRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListRolesResponseFromJSON(jsonValue)); + } + + /** + * Lists all Roles. + */ + async roleServiceListRoles(requestParameters: RoleServiceListRolesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceListRolesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Removes grant scopes from a Role. + */ + async roleServiceRemoveRoleGrantScopesRaw(requestParameters: RoleServiceRemoveRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceRemoveRoleGrantScopes().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling roleServiceRemoveRoleGrantScopes().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}:remove-grant-scopes`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Removes grant scopes from a Role. + */ + async roleServiceRemoveRoleGrantScopes(requestParameters: RoleServiceRemoveRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceRemoveRoleGrantScopesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Removes grants from a Role. + */ + async roleServiceRemoveRoleGrantsRaw(requestParameters: RoleServiceRemoveRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceRemoveRoleGrants().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling roleServiceRemoveRoleGrants().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}:remove-grants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Removes grants from a Role. + */ + async roleServiceRemoveRoleGrants(requestParameters: RoleServiceRemoveRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceRemoveRoleGrantsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Removes the specified Users and/or Groups from a Role. + */ + async roleServiceRemoveRolePrincipalsRaw(requestParameters: RoleServiceRemoveRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceRemoveRolePrincipals().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling roleServiceRemoveRolePrincipals().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}:remove-principals`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Removes the specified Users and/or Groups from a Role. + */ + async roleServiceRemoveRolePrincipals(requestParameters: RoleServiceRemoveRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceRemoveRolePrincipalsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Set grant scopes for a Role, removing any grant scopes that are not specified in the request. + */ + async roleServiceSetRoleGrantScopesRaw(requestParameters: RoleServiceSetRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceSetRoleGrantScopes().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling roleServiceSetRoleGrantScopes().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}:set-grant-scopes`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Set grant scopes for a Role, removing any grant scopes that are not specified in the request. + */ + async roleServiceSetRoleGrantScopes(requestParameters: RoleServiceSetRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceSetRoleGrantScopesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Set grants for a Role, removing any grants that are not specified in the request. + */ + async roleServiceSetRoleGrantsRaw(requestParameters: RoleServiceSetRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceSetRoleGrants().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling roleServiceSetRoleGrants().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}:set-grants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1RoleServiceSetRoleGrantsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Set grants for a Role, removing any grants that are not specified in the request. + */ + async roleServiceSetRoleGrants(requestParameters: RoleServiceSetRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceSetRoleGrantsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Set Users and/or Groups to a Role, removing any principals that are not specified in the request. + */ + async roleServiceSetRolePrincipalsRaw(requestParameters: RoleServiceSetRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceSetRolePrincipals().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling roleServiceSetRolePrincipals().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}:set-principals`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Set Users and/or Groups to a Role, removing any principals that are not specified in the request. + */ + async roleServiceSetRolePrincipals(requestParameters: RoleServiceSetRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceSetRolePrincipalsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a Role. + */ + async roleServiceUpdateRoleRaw(requestParameters: RoleServiceUpdateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling roleServiceUpdateRole().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling roleServiceUpdateRole().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/roles/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesRolesV1RoleToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue)); + } + + /** + * Updates a Role. + */ + async roleServiceUpdateRole(requestParameters: RoleServiceUpdateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.roleServiceUpdateRoleRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/ScopeServiceApi.ts b/e2e-tests/api-client/apis/ScopeServiceApi.ts new file mode 100644 index 000000000..031839f3a --- /dev/null +++ b/e2e-tests/api-client/apis/ScopeServiceApi.ts @@ -0,0 +1,577 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesScopesV1Scope, + ControllerApiServicesV1DestroyKeyVersionRequest, + ControllerApiServicesV1DestroyKeyVersionResponse, + ControllerApiServicesV1ListKeyVersionDestructionJobsResponse, + ControllerApiServicesV1ListKeysResponse, + ControllerApiServicesV1ListScopesResponse, + ControllerApiServicesV1RotateKeysRequest, + ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody, + ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesScopesV1ScopeFromJSON, + ControllerApiResourcesScopesV1ScopeToJSON, + ControllerApiServicesV1DestroyKeyVersionRequestFromJSON, + ControllerApiServicesV1DestroyKeyVersionRequestToJSON, + ControllerApiServicesV1DestroyKeyVersionResponseFromJSON, + ControllerApiServicesV1DestroyKeyVersionResponseToJSON, + ControllerApiServicesV1ListKeyVersionDestructionJobsResponseFromJSON, + ControllerApiServicesV1ListKeyVersionDestructionJobsResponseToJSON, + ControllerApiServicesV1ListKeysResponseFromJSON, + ControllerApiServicesV1ListKeysResponseToJSON, + ControllerApiServicesV1ListScopesResponseFromJSON, + ControllerApiServicesV1ListScopesResponseToJSON, + ControllerApiServicesV1RotateKeysRequestFromJSON, + ControllerApiServicesV1RotateKeysRequestToJSON, + ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyFromJSON, + ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyToJSON, + ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyFromJSON, + ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface ScopeServiceAttachStoragePolicyRequest { + id: string; + body: ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody; +} + +export interface ScopeServiceCreateScopeRequest { + item: Omit; + skipAdminRoleCreation?: boolean; + skipDefaultRoleCreation?: boolean; +} + +export interface ScopeServiceDeleteScopeRequest { + id: string; +} + +export interface ScopeServiceDestroyKeyVersionRequest { + body: ControllerApiServicesV1DestroyKeyVersionRequest; +} + +export interface ScopeServiceDetachStoragePolicyRequest { + id: string; + body: ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody; +} + +export interface ScopeServiceGetScopeRequest { + id: string; +} + +export interface ScopeServiceListKeyVersionDestructionJobsRequest { + scopeId: string; +} + +export interface ScopeServiceListKeysRequest { + id: string; +} + +export interface ScopeServiceListScopesRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface ScopeServiceRotateKeysRequest { + body: ControllerApiServicesV1RotateKeysRequest; +} + +export interface ScopeServiceUpdateScopeRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class ScopeServiceApi extends runtime.BaseAPI { + + /** + * Attaches the specified Storage Policy to the Scope. + */ + async scopeServiceAttachStoragePolicyRaw(requestParameters: ScopeServiceAttachStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling scopeServiceAttachStoragePolicy().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling scopeServiceAttachStoragePolicy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes/{id}:attach-storage-policy`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesScopesV1ScopeFromJSON(jsonValue)); + } + + /** + * Attaches the specified Storage Policy to the Scope. + */ + async scopeServiceAttachStoragePolicy(requestParameters: ScopeServiceAttachStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceAttachStoragePolicyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a single Scope. + */ + async scopeServiceCreateScopeRaw(requestParameters: ScopeServiceCreateScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling scopeServiceCreateScope().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['skipAdminRoleCreation'] != null) { + queryParameters['skip_admin_role_creation'] = requestParameters['skipAdminRoleCreation']; + } + + if (requestParameters['skipDefaultRoleCreation'] != null) { + queryParameters['skip_default_role_creation'] = requestParameters['skipDefaultRoleCreation']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesScopesV1ScopeToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesScopesV1ScopeFromJSON(jsonValue)); + } + + /** + * Creates a single Scope. + */ + async scopeServiceCreateScope(requestParameters: ScopeServiceCreateScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceCreateScopeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a Scope. + */ + async scopeServiceDeleteScopeRaw(requestParameters: ScopeServiceDeleteScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling scopeServiceDeleteScope().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a Scope. + */ + async scopeServiceDeleteScope(requestParameters: ScopeServiceDeleteScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceDeleteScopeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Destroy the specified key version in a Scope. This may start an asynchronous job that re-encrypts all data encrypted by the specified key version. Use GET /v1/scopes/{scope_id}:list-key-version-destruction-jobs to monitor pending destruction jobs. + */ + async scopeServiceDestroyKeyVersionRaw(requestParameters: ScopeServiceDestroyKeyVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling scopeServiceDestroyKeyVersion().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes:destroy-key-version`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1DestroyKeyVersionRequestToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1DestroyKeyVersionResponseFromJSON(jsonValue)); + } + + /** + * Destroy the specified key version in a Scope. This may start an asynchronous job that re-encrypts all data encrypted by the specified key version. Use GET /v1/scopes/{scope_id}:list-key-version-destruction-jobs to monitor pending destruction jobs. + */ + async scopeServiceDestroyKeyVersion(requestParameters: ScopeServiceDestroyKeyVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceDestroyKeyVersionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Detaches the specified Storage Policy from the Scope. + */ + async scopeServiceDetachStoragePolicyRaw(requestParameters: ScopeServiceDetachStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling scopeServiceDetachStoragePolicy().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling scopeServiceDetachStoragePolicy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes/{id}:detach-storage-policy`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesScopesV1ScopeFromJSON(jsonValue)); + } + + /** + * Detaches the specified Storage Policy from the Scope. + */ + async scopeServiceDetachStoragePolicy(requestParameters: ScopeServiceDetachStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceDetachStoragePolicyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Scope. + */ + async scopeServiceGetScopeRaw(requestParameters: ScopeServiceGetScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling scopeServiceGetScope().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesScopesV1ScopeFromJSON(jsonValue)); + } + + /** + * Gets a single Scope. + */ + async scopeServiceGetScope(requestParameters: ScopeServiceGetScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceGetScopeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all pending key version destruction jobs in a Scope. + */ + async scopeServiceListKeyVersionDestructionJobsRaw(requestParameters: ScopeServiceListKeyVersionDestructionJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['scopeId'] == null) { + throw new runtime.RequiredError( + 'scopeId', + 'Required parameter "scopeId" was null or undefined when calling scopeServiceListKeyVersionDestructionJobs().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes/{scope_id}:list-key-version-destruction-jobs`.replace(`{${"scope_id"}}`, encodeURIComponent(String(requestParameters['scopeId']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListKeyVersionDestructionJobsResponseFromJSON(jsonValue)); + } + + /** + * Lists all pending key version destruction jobs in a Scope. + */ + async scopeServiceListKeyVersionDestructionJobs(requestParameters: ScopeServiceListKeyVersionDestructionJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceListKeyVersionDestructionJobsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * List all keys in a Scope. + */ + async scopeServiceListKeysRaw(requestParameters: ScopeServiceListKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling scopeServiceListKeys().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes/{id}:list-keys`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListKeysResponseFromJSON(jsonValue)); + } + + /** + * List all keys in a Scope. + */ + async scopeServiceListKeys(requestParameters: ScopeServiceListKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceListKeysRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Scopes within the Scope provided in the request. + */ + async scopeServiceListScopesRaw(requestParameters: ScopeServiceListScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListScopesResponseFromJSON(jsonValue)); + } + + /** + * Lists all Scopes within the Scope provided in the request. + */ + async scopeServiceListScopes(requestParameters: ScopeServiceListScopesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceListScopesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Rotate all keys in a Scope. + */ + async scopeServiceRotateKeysRaw(requestParameters: ScopeServiceRotateKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling scopeServiceRotateKeys().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes:rotate-keys`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1RotateKeysRequestToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Rotate all keys in a Scope. + */ + async scopeServiceRotateKeys(requestParameters: ScopeServiceRotateKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceRotateKeysRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a Scope. + */ + async scopeServiceUpdateScopeRaw(requestParameters: ScopeServiceUpdateScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling scopeServiceUpdateScope().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling scopeServiceUpdateScope().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/scopes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesScopesV1ScopeToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesScopesV1ScopeFromJSON(jsonValue)); + } + + /** + * Updates a Scope. + */ + async scopeServiceUpdateScope(requestParameters: ScopeServiceUpdateScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.scopeServiceUpdateScopeRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/SessionRecordingServiceApi.ts b/e2e-tests/api-client/apis/SessionRecordingServiceApi.ts new file mode 100644 index 000000000..125643dc3 --- /dev/null +++ b/e2e-tests/api-client/apis/SessionRecordingServiceApi.ts @@ -0,0 +1,258 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesSessionrecordingsV1SessionRecording, + ControllerApiServicesV1ListSessionRecordingsResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON, + ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSON, + ControllerApiServicesV1ListSessionRecordingsResponseFromJSON, + ControllerApiServicesV1ListSessionRecordingsResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface SessionRecordingServiceDeleteSessionRecordingRequest { + id: string; +} + +export interface SessionRecordingServiceDownloadRequest { + id: string; + mimeType?: string; +} + +export interface SessionRecordingServiceGetSessionRecordingRequest { + id: string; +} + +export interface SessionRecordingServiceListSessionRecordingsRequest { + scopeId?: string; + recursive?: boolean; + listToken?: string; + pageSize?: number; +} + +export interface SessionRecordingServiceReApplyStoragePolicyRequest { + id: string; +} + +/** + * + */ +export class SessionRecordingServiceApi extends runtime.BaseAPI { + + /** + * Deletes a Session Recording + */ + async sessionRecordingServiceDeleteSessionRecordingRaw(requestParameters: SessionRecordingServiceDeleteSessionRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sessionRecordingServiceDeleteSessionRecording().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/session-recordings/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a Session Recording + */ + async sessionRecordingServiceDeleteSessionRecording(requestParameters: SessionRecordingServiceDeleteSessionRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sessionRecordingServiceDeleteSessionRecordingRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Download returns the contents of the specified resource in the specified mime type. Supports both Session ID and Session recording ID for looking up a Session recording. Supports both Connection ID and Connection recording ID to look up a Connection recording. A Channel recording ID is required to look up a Channel recording. The only supported mime type is \"application/x-asciicast\". + */ + async sessionRecordingServiceDownloadRaw(requestParameters: SessionRecordingServiceDownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sessionRecordingServiceDownload().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['mimeType'] != null) { + queryParameters['mime_type'] = requestParameters['mimeType']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/session-recordings/{id}:download`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.BlobApiResponse(response); + } + + /** + * Download returns the contents of the specified resource in the specified mime type. Supports both Session ID and Session recording ID for looking up a Session recording. Supports both Connection ID and Connection recording ID to look up a Connection recording. A Channel recording ID is required to look up a Channel recording. The only supported mime type is \"application/x-asciicast\". + */ + async sessionRecordingServiceDownload(requestParameters: SessionRecordingServiceDownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sessionRecordingServiceDownloadRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * GetSessionRecording returns a stored Session recording if present. The provided request must include the Session recording ID for the Session recording being retrieved, or the ID of the Session that was recorded. If that ID is missing, malformed or reference a non existing resource, an error is returned. + */ + async sessionRecordingServiceGetSessionRecordingRaw(requestParameters: SessionRecordingServiceGetSessionRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sessionRecordingServiceGetSessionRecording().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/session-recordings/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON(jsonValue)); + } + + /** + * GetSessionRecording returns a stored Session recording if present. The provided request must include the Session recording ID for the Session recording being retrieved, or the ID of the Session that was recorded. If that ID is missing, malformed or reference a non existing resource, an error is returned. + */ + async sessionRecordingServiceGetSessionRecording(requestParameters: SessionRecordingServiceGetSessionRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sessionRecordingServiceGetSessionRecordingRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * ListSessionRecordings lists all Session recordings. Session recordings are ordered by start_time descending (most recently started first). + */ + async sessionRecordingServiceListSessionRecordingsRaw(requestParameters: SessionRecordingServiceListSessionRecordingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/session-recordings`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListSessionRecordingsResponseFromJSON(jsonValue)); + } + + /** + * ListSessionRecordings lists all Session recordings. Session recordings are ordered by start_time descending (most recently started first). + */ + async sessionRecordingServiceListSessionRecordings(requestParameters: SessionRecordingServiceListSessionRecordingsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sessionRecordingServiceListSessionRecordingsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * ReApplyStoragePolicy will recalculate the resultant set of policy and apply the result to the given session recording. + */ + async sessionRecordingServiceReApplyStoragePolicyRaw(requestParameters: SessionRecordingServiceReApplyStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sessionRecordingServiceReApplyStoragePolicy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/session-recordings/{id}:reapply-storage-policy`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON(jsonValue)); + } + + /** + * ReApplyStoragePolicy will recalculate the resultant set of policy and apply the result to the given session recording. + */ + async sessionRecordingServiceReApplyStoragePolicy(requestParameters: SessionRecordingServiceReApplyStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sessionRecordingServiceReApplyStoragePolicyRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/SessionServiceApi.ts b/e2e-tests/api-client/apis/SessionServiceApi.ts new file mode 100644 index 000000000..35134cb97 --- /dev/null +++ b/e2e-tests/api-client/apis/SessionServiceApi.ts @@ -0,0 +1,195 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesSessionsV1Session, + ControllerApiServicesV1ListSessionsResponse, + ControllerApiServicesV1SessionServiceCancelSessionBody, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesSessionsV1SessionFromJSON, + ControllerApiResourcesSessionsV1SessionToJSON, + ControllerApiServicesV1ListSessionsResponseFromJSON, + ControllerApiServicesV1ListSessionsResponseToJSON, + ControllerApiServicesV1SessionServiceCancelSessionBodyFromJSON, + ControllerApiServicesV1SessionServiceCancelSessionBodyToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface SessionServiceCancelSessionRequest { + id: string; + body: ControllerApiServicesV1SessionServiceCancelSessionBody; +} + +export interface SessionServiceGetSessionRequest { + id: string; +} + +export interface SessionServiceListSessionsRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + includeTerminated?: boolean; + listToken?: string; + pageSize?: number; +} + +/** + * + */ +export class SessionServiceApi extends runtime.BaseAPI { + + /** + * Cancels a Session. + */ + async sessionServiceCancelSessionRaw(requestParameters: SessionServiceCancelSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sessionServiceCancelSession().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling sessionServiceCancelSession().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/sessions/{id}:cancel`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1SessionServiceCancelSessionBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesSessionsV1SessionFromJSON(jsonValue)); + } + + /** + * Cancels a Session. + */ + async sessionServiceCancelSession(requestParameters: SessionServiceCancelSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sessionServiceCancelSessionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Session. + */ + async sessionServiceGetSessionRaw(requestParameters: SessionServiceGetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling sessionServiceGetSession().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/sessions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesSessionsV1SessionFromJSON(jsonValue)); + } + + /** + * Gets a single Session. + */ + async sessionServiceGetSession(requestParameters: SessionServiceGetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sessionServiceGetSessionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Sessions. + */ + async sessionServiceListSessionsRaw(requestParameters: SessionServiceListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['includeTerminated'] != null) { + queryParameters['include_terminated'] = requestParameters['includeTerminated']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/sessions`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListSessionsResponseFromJSON(jsonValue)); + } + + /** + * Lists all Sessions. + */ + async sessionServiceListSessions(requestParameters: SessionServiceListSessionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sessionServiceListSessionsRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/StorageBucketServiceApi.ts b/e2e-tests/api-client/apis/StorageBucketServiceApi.ts new file mode 100644 index 000000000..23f86f009 --- /dev/null +++ b/e2e-tests/api-client/apis/StorageBucketServiceApi.ts @@ -0,0 +1,277 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesStoragebucketsV1StorageBucket, + ControllerApiServicesV1ListStorageBucketsResponse, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON, + ControllerApiResourcesStoragebucketsV1StorageBucketToJSON, + ControllerApiServicesV1ListStorageBucketsResponseFromJSON, + ControllerApiServicesV1ListStorageBucketsResponseToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface StorageBucketServiceCreateStorageBucketRequest { + item: Omit; + pluginName?: string; +} + +export interface StorageBucketServiceDeleteStorageBucketRequest { + id: string; +} + +export interface StorageBucketServiceGetStorageBucketRequest { + id: string; +} + +export interface StorageBucketServiceListStorageBucketsRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface StorageBucketServiceUpdateStorageBucketRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class StorageBucketServiceApi extends runtime.BaseAPI { + + /** + * Creates a Storage Bucket + */ + async storageBucketServiceCreateStorageBucketRaw(requestParameters: StorageBucketServiceCreateStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling storageBucketServiceCreateStorageBucket().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['pluginName'] != null) { + queryParameters['plugin_name'] = requestParameters['pluginName']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/storage-buckets`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesStoragebucketsV1StorageBucketToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(jsonValue)); + } + + /** + * Creates a Storage Bucket + */ + async storageBucketServiceCreateStorageBucket(requestParameters: StorageBucketServiceCreateStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.storageBucketServiceCreateStorageBucketRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a Storage Bucket + */ + async storageBucketServiceDeleteStorageBucketRaw(requestParameters: StorageBucketServiceDeleteStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling storageBucketServiceDeleteStorageBucket().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/storage-buckets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a Storage Bucket + */ + async storageBucketServiceDeleteStorageBucket(requestParameters: StorageBucketServiceDeleteStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.storageBucketServiceDeleteStorageBucketRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Storage Bucket. + */ + async storageBucketServiceGetStorageBucketRaw(requestParameters: StorageBucketServiceGetStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling storageBucketServiceGetStorageBucket().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/storage-buckets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(jsonValue)); + } + + /** + * Gets a single Storage Bucket. + */ + async storageBucketServiceGetStorageBucket(requestParameters: StorageBucketServiceGetStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.storageBucketServiceGetStorageBucketRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a list of Storage Buckets. + */ + async storageBucketServiceListStorageBucketsRaw(requestParameters: StorageBucketServiceListStorageBucketsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/storage-buckets`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListStorageBucketsResponseFromJSON(jsonValue)); + } + + /** + * Gets a list of Storage Buckets. + */ + async storageBucketServiceListStorageBuckets(requestParameters: StorageBucketServiceListStorageBucketsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.storageBucketServiceListStorageBucketsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a Storage Bucket + */ + async storageBucketServiceUpdateStorageBucketRaw(requestParameters: StorageBucketServiceUpdateStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling storageBucketServiceUpdateStorageBucket().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling storageBucketServiceUpdateStorageBucket().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/storage-buckets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesStoragebucketsV1StorageBucketToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(jsonValue)); + } + + /** + * Updates a Storage Bucket + */ + async storageBucketServiceUpdateStorageBucket(requestParameters: StorageBucketServiceUpdateStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.storageBucketServiceUpdateStorageBucketRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/TargetServiceApi.ts b/e2e-tests/api-client/apis/TargetServiceApi.ts new file mode 100644 index 000000000..0ced95baa --- /dev/null +++ b/e2e-tests/api-client/apis/TargetServiceApi.ts @@ -0,0 +1,660 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesTargetsV1SessionAuthorization, + ControllerApiResourcesTargetsV1Target, + ControllerApiServicesV1ListTargetsResponse, + ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody, + ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody, + ControllerApiServicesV1TargetServiceAuthorizeSessionBody, + ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody, + ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody, + ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody, + ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesTargetsV1SessionAuthorizationFromJSON, + ControllerApiResourcesTargetsV1SessionAuthorizationToJSON, + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiServicesV1ListTargetsResponseFromJSON, + ControllerApiServicesV1ListTargetsResponseToJSON, + ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyFromJSON, + ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyToJSON, + ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyFromJSON, + ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyToJSON, + ControllerApiServicesV1TargetServiceAuthorizeSessionBodyFromJSON, + ControllerApiServicesV1TargetServiceAuthorizeSessionBodyToJSON, + ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyFromJSON, + ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyToJSON, + ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyFromJSON, + ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyToJSON, + ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyFromJSON, + ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyToJSON, + ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyFromJSON, + ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface TargetServiceAddTargetCredentialSourcesRequest { + id: string; + body: ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody; +} + +export interface TargetServiceAddTargetHostSourcesRequest { + id: string; + body: ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody; +} + +export interface TargetServiceAuthorizeSessionRequest { + id: string; + body: ControllerApiServicesV1TargetServiceAuthorizeSessionBody; +} + +export interface TargetServiceCreateTargetRequest { + item: Omit; +} + +export interface TargetServiceDeleteTargetRequest { + id: string; +} + +export interface TargetServiceGetTargetRequest { + id: string; +} + +export interface TargetServiceListTargetsRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface TargetServiceRemoveTargetCredentialSourcesRequest { + id: string; + body: ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody; +} + +export interface TargetServiceRemoveTargetHostSourcesRequest { + id: string; + body: ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody; +} + +export interface TargetServiceSetTargetCredentialSourcesRequest { + id: string; + body: ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody; +} + +export interface TargetServiceSetTargetHostSourcesRequest { + id: string; + body: ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody; +} + +export interface TargetServiceUpdateTargetRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class TargetServiceApi extends runtime.BaseAPI { + + /** + * Adds existing Credential Sources to a Target. + */ + async targetServiceAddTargetCredentialSourcesRaw(requestParameters: TargetServiceAddTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling targetServiceAddTargetCredentialSources().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling targetServiceAddTargetCredentialSources().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets/{id}:add-credential-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue)); + } + + /** + * Adds existing Credential Sources to a Target. + */ + async targetServiceAddTargetCredentialSources(requestParameters: TargetServiceAddTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceAddTargetCredentialSourcesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Adds existing Host Sources to a Target. Cannot be used on targets that have their address field set. + */ + async targetServiceAddTargetHostSourcesRaw(requestParameters: TargetServiceAddTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling targetServiceAddTargetHostSources().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling targetServiceAddTargetHostSources().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets/{id}:add-host-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue)); + } + + /** + * Adds existing Host Sources to a Target. Cannot be used on targets that have their address field set. + */ + async targetServiceAddTargetHostSources(requestParameters: TargetServiceAddTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceAddTargetHostSourcesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Authorizes a Session. + */ + async targetServiceAuthorizeSessionRaw(requestParameters: TargetServiceAuthorizeSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling targetServiceAuthorizeSession().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling targetServiceAuthorizeSession().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets/{id}:authorize-session`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1TargetServiceAuthorizeSessionBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1SessionAuthorizationFromJSON(jsonValue)); + } + + /** + * Authorizes a Session. + */ + async targetServiceAuthorizeSession(requestParameters: TargetServiceAuthorizeSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceAuthorizeSessionRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a single Target. + */ + async targetServiceCreateTargetRaw(requestParameters: TargetServiceCreateTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling targetServiceCreateTarget().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesTargetsV1TargetToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue)); + } + + /** + * Creates a single Target. + */ + async targetServiceCreateTarget(requestParameters: TargetServiceCreateTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceCreateTargetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a Target. + */ + async targetServiceDeleteTargetRaw(requestParameters: TargetServiceDeleteTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling targetServiceDeleteTarget().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a Target. + */ + async targetServiceDeleteTarget(requestParameters: TargetServiceDeleteTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceDeleteTargetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Target. + */ + async targetServiceGetTargetRaw(requestParameters: TargetServiceGetTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling targetServiceGetTarget().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue)); + } + + /** + * Gets a single Target. + */ + async targetServiceGetTarget(requestParameters: TargetServiceGetTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceGetTargetRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Targets. + */ + async targetServiceListTargetsRaw(requestParameters: TargetServiceListTargetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListTargetsResponseFromJSON(jsonValue)); + } + + /** + * Lists all Targets. + */ + async targetServiceListTargets(requestParameters: TargetServiceListTargetsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceListTargetsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Removes Credential Sources from the Target. + */ + async targetServiceRemoveTargetCredentialSourcesRaw(requestParameters: TargetServiceRemoveTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling targetServiceRemoveTargetCredentialSources().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling targetServiceRemoveTargetCredentialSources().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets/{id}:remove-credential-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue)); + } + + /** + * Removes Credential Sources from the Target. + */ + async targetServiceRemoveTargetCredentialSources(requestParameters: TargetServiceRemoveTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceRemoveTargetCredentialSourcesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Removes Host Sources from the Target. + */ + async targetServiceRemoveTargetHostSourcesRaw(requestParameters: TargetServiceRemoveTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling targetServiceRemoveTargetHostSources().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling targetServiceRemoveTargetHostSources().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets/{id}:remove-host-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue)); + } + + /** + * Removes Host Sources from the Target. + */ + async targetServiceRemoveTargetHostSources(requestParameters: TargetServiceRemoveTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceRemoveTargetHostSourcesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Sets the Credential Sources on the Target. + */ + async targetServiceSetTargetCredentialSourcesRaw(requestParameters: TargetServiceSetTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling targetServiceSetTargetCredentialSources().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling targetServiceSetTargetCredentialSources().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets/{id}:set-credential-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue)); + } + + /** + * Sets the Credential Sources on the Target. + */ + async targetServiceSetTargetCredentialSources(requestParameters: TargetServiceSetTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceSetTargetCredentialSourcesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Sources the Host Sources on the Target. Cannot be used on targets that have their address field set. + */ + async targetServiceSetTargetHostSourcesRaw(requestParameters: TargetServiceSetTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling targetServiceSetTargetHostSources().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling targetServiceSetTargetHostSources().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets/{id}:set-host-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue)); + } + + /** + * Sources the Host Sources on the Target. Cannot be used on targets that have their address field set. + */ + async targetServiceSetTargetHostSources(requestParameters: TargetServiceSetTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceSetTargetHostSourcesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a Target. + */ + async targetServiceUpdateTargetRaw(requestParameters: TargetServiceUpdateTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling targetServiceUpdateTarget().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling targetServiceUpdateTarget().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/targets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesTargetsV1TargetToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue)); + } + + /** + * Updates a Target. + */ + async targetServiceUpdateTarget(requestParameters: TargetServiceUpdateTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.targetServiceUpdateTargetRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/UserServiceApi.ts b/e2e-tests/api-client/apis/UserServiceApi.ts new file mode 100644 index 000000000..87c8170d8 --- /dev/null +++ b/e2e-tests/api-client/apis/UserServiceApi.ts @@ -0,0 +1,491 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesUsersV1User, + ControllerApiServicesV1ListResolvableAliasesResponse, + ControllerApiServicesV1ListUsersResponse, + ControllerApiServicesV1UserServiceAddUserAccountsBody, + ControllerApiServicesV1UserServiceRemoveUserAccountsBody, + ControllerApiServicesV1UserServiceSetUserAccountsBody, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesUsersV1UserFromJSON, + ControllerApiResourcesUsersV1UserToJSON, + ControllerApiServicesV1ListResolvableAliasesResponseFromJSON, + ControllerApiServicesV1ListResolvableAliasesResponseToJSON, + ControllerApiServicesV1ListUsersResponseFromJSON, + ControllerApiServicesV1ListUsersResponseToJSON, + ControllerApiServicesV1UserServiceAddUserAccountsBodyFromJSON, + ControllerApiServicesV1UserServiceAddUserAccountsBodyToJSON, + ControllerApiServicesV1UserServiceRemoveUserAccountsBodyFromJSON, + ControllerApiServicesV1UserServiceRemoveUserAccountsBodyToJSON, + ControllerApiServicesV1UserServiceSetUserAccountsBodyFromJSON, + ControllerApiServicesV1UserServiceSetUserAccountsBodyToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface UserServiceAddUserAccountsRequest { + id: string; + body: ControllerApiServicesV1UserServiceAddUserAccountsBody; +} + +export interface UserServiceCreateUserRequest { + item: Omit; +} + +export interface UserServiceDeleteUserRequest { + id: string; +} + +export interface UserServiceGetUserRequest { + id: string; +} + +export interface UserServiceListResolvableAliasesRequest { + id: string; + listToken?: string; + pageSize?: number; +} + +export interface UserServiceListUsersRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; + listToken?: string; + pageSize?: number; +} + +export interface UserServiceRemoveUserAccountsRequest { + id: string; + body: ControllerApiServicesV1UserServiceRemoveUserAccountsBody; +} + +export interface UserServiceSetUserAccountsRequest { + id: string; + body: ControllerApiServicesV1UserServiceSetUserAccountsBody; +} + +export interface UserServiceUpdateUserRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class UserServiceApi extends runtime.BaseAPI { + + /** + * Associates an Account to a User. + */ + async userServiceAddUserAccountsRaw(requestParameters: UserServiceAddUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling userServiceAddUserAccounts().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling userServiceAddUserAccounts().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/users/{id}:add-accounts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1UserServiceAddUserAccountsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue)); + } + + /** + * Associates an Account to a User. + */ + async userServiceAddUserAccounts(requestParameters: UserServiceAddUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userServiceAddUserAccountsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a single User. + */ + async userServiceCreateUserRaw(requestParameters: UserServiceCreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling userServiceCreateUser().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/users`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesUsersV1UserToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue)); + } + + /** + * Creates a single User. + */ + async userServiceCreateUser(requestParameters: UserServiceCreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userServiceCreateUserRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a User. + */ + async userServiceDeleteUserRaw(requestParameters: UserServiceDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling userServiceDeleteUser().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a User. + */ + async userServiceDeleteUser(requestParameters: UserServiceDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userServiceDeleteUserRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single User. + */ + async userServiceGetUserRaw(requestParameters: UserServiceGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling userServiceGetUser().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue)); + } + + /** + * Gets a single User. + */ + async userServiceGetUser(requestParameters: UserServiceGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userServiceGetUserRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Aliases which point to a resource for which the requester has some permission. + */ + async userServiceListResolvableAliasesRaw(requestParameters: UserServiceListResolvableAliasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling userServiceListResolvableAliases().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/users/{id}:list-resolvable-aliases`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListResolvableAliasesResponseFromJSON(jsonValue)); + } + + /** + * Lists all Aliases which point to a resource for which the requester has some permission. + */ + async userServiceListResolvableAliases(requestParameters: UserServiceListResolvableAliasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userServiceListResolvableAliasesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Users. + */ + async userServiceListUsersRaw(requestParameters: UserServiceListUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + if (requestParameters['listToken'] != null) { + queryParameters['list_token'] = requestParameters['listToken']; + } + + if (requestParameters['pageSize'] != null) { + queryParameters['page_size'] = requestParameters['pageSize']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/users`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListUsersResponseFromJSON(jsonValue)); + } + + /** + * Lists all Users. + */ + async userServiceListUsers(requestParameters: UserServiceListUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userServiceListUsersRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Removes the specified Accounts from being associated with the provided User. + */ + async userServiceRemoveUserAccountsRaw(requestParameters: UserServiceRemoveUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling userServiceRemoveUserAccounts().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling userServiceRemoveUserAccounts().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/users/{id}:remove-accounts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1UserServiceRemoveUserAccountsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue)); + } + + /** + * Removes the specified Accounts from being associated with the provided User. + */ + async userServiceRemoveUserAccounts(requestParameters: UserServiceRemoveUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userServiceRemoveUserAccountsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Set the Accounts associated to the User to exactly the list of provided in the request, removing any Accounts that are not specified. + */ + async userServiceSetUserAccountsRaw(requestParameters: UserServiceSetUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling userServiceSetUserAccounts().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling userServiceSetUserAccounts().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/users/{id}:set-accounts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1UserServiceSetUserAccountsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue)); + } + + /** + * Set the Accounts associated to the User to exactly the list of provided in the request, removing any Accounts that are not specified. + */ + async userServiceSetUserAccounts(requestParameters: UserServiceSetUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userServiceSetUserAccountsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a User. + */ + async userServiceUpdateUserRaw(requestParameters: UserServiceUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling userServiceUpdateUser().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling userServiceUpdateUser().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesUsersV1UserToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue)); + } + + /** + * Updates a User. + */ + async userServiceUpdateUser(requestParameters: UserServiceUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.userServiceUpdateUserRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/WorkerServiceApi.ts b/e2e-tests/api-client/apis/WorkerServiceApi.ts new file mode 100644 index 000000000..deabc26bc --- /dev/null +++ b/e2e-tests/api-client/apis/WorkerServiceApi.ts @@ -0,0 +1,550 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import * as runtime from '../runtime'; +import type { + ControllerApiResourcesWorkersV1CertificateAuthority, + ControllerApiResourcesWorkersV1Worker, + ControllerApiServicesV1ListWorkersResponse, + ControllerApiServicesV1WorkerServiceAddWorkerTagsBody, + ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody, + ControllerApiServicesV1WorkerServiceSetWorkerTagsBody, + ControllerApiV1Error, +} from '../models/index'; +import { + ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON, + ControllerApiResourcesWorkersV1CertificateAuthorityToJSON, + ControllerApiResourcesWorkersV1WorkerFromJSON, + ControllerApiResourcesWorkersV1WorkerToJSON, + ControllerApiServicesV1ListWorkersResponseFromJSON, + ControllerApiServicesV1ListWorkersResponseToJSON, + ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyFromJSON, + ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyToJSON, + ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyFromJSON, + ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyToJSON, + ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyFromJSON, + ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyToJSON, + ControllerApiV1ErrorFromJSON, + ControllerApiV1ErrorToJSON, +} from '../models/index'; + +export interface WorkerServiceAddWorkerTagsRequest { + id: string; + body: ControllerApiServicesV1WorkerServiceAddWorkerTagsBody; +} + +export interface WorkerServiceCreateControllerLedRequest { + item: Omit; +} + +export interface WorkerServiceCreateWorkerLedRequest { + item: Omit; +} + +export interface WorkerServiceDeleteWorkerRequest { + id: string; +} + +export interface WorkerServiceGetWorkerRequest { + id: string; +} + +export interface WorkerServiceListWorkersRequest { + scopeId?: string; + recursive?: boolean; + filter?: string; +} + +export interface WorkerServiceReadCertificateAuthorityRequest { + scopeId?: string; +} + +export interface WorkerServiceReinitializeCertificateAuthorityRequest { + scopeId?: string; +} + +export interface WorkerServiceRemoveWorkerTagsRequest { + id: string; + body: ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody; +} + +export interface WorkerServiceSetWorkerTagsRequest { + id: string; + body: ControllerApiServicesV1WorkerServiceSetWorkerTagsBody; +} + +export interface WorkerServiceUpdateWorkerRequest { + id: string; + item: Omit; +} + +/** + * + */ +export class WorkerServiceApi extends runtime.BaseAPI { + + /** + * Adds api tags to an existing Worker. + */ + async workerServiceAddWorkerTagsRaw(requestParameters: WorkerServiceAddWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling workerServiceAddWorkerTags().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling workerServiceAddWorkerTags().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers/{id}:add-worker-tags`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue)); + } + + /** + * Adds api tags to an existing Worker. + */ + async workerServiceAddWorkerTags(requestParameters: WorkerServiceAddWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceAddWorkerTagsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a single Worker. + */ + async workerServiceCreateControllerLedRaw(requestParameters: WorkerServiceCreateControllerLedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling workerServiceCreateControllerLed().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers:create:controller-led`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesWorkersV1WorkerToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue)); + } + + /** + * Creates a single Worker. + */ + async workerServiceCreateControllerLed(requestParameters: WorkerServiceCreateControllerLedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceCreateControllerLedRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates a single Worker. + */ + async workerServiceCreateWorkerLedRaw(requestParameters: WorkerServiceCreateWorkerLedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling workerServiceCreateWorkerLed().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers:create:worker-led`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesWorkersV1WorkerToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue)); + } + + /** + * Creates a single Worker. + */ + async workerServiceCreateWorkerLed(requestParameters: WorkerServiceCreateWorkerLedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceCreateWorkerLedRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Deletes a Worker. + */ + async workerServiceDeleteWorkerRaw(requestParameters: WorkerServiceDeleteWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling workerServiceDeleteWorker().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Deletes a Worker. + */ + async workerServiceDeleteWorker(requestParameters: WorkerServiceDeleteWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceDeleteWorkerRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Gets a single Worker. + */ + async workerServiceGetWorkerRaw(requestParameters: WorkerServiceGetWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling workerServiceGetWorker().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue)); + } + + /** + * Gets a single Worker. + */ + async workerServiceGetWorker(requestParameters: WorkerServiceGetWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceGetWorkerRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Lists all Workers. + */ + async workerServiceListWorkersRaw(requestParameters: WorkerServiceListWorkersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + if (requestParameters['filter'] != null) { + queryParameters['filter'] = requestParameters['filter']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListWorkersResponseFromJSON(jsonValue)); + } + + /** + * Lists all Workers. + */ + async workerServiceListWorkers(requestParameters: WorkerServiceListWorkersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceListWorkersRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Retrieves root certificates used for worker authentication. + */ + async workerServiceReadCertificateAuthorityRaw(requestParameters: WorkerServiceReadCertificateAuthorityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers:read-certificate-authority`, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON(jsonValue)); + } + + /** + * Retrieves root certificates used for worker authentication. + */ + async workerServiceReadCertificateAuthority(requestParameters: WorkerServiceReadCertificateAuthorityRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceReadCertificateAuthorityRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Reinitializes root certificates used for worker authentication. + */ + async workerServiceReinitializeCertificateAuthorityRaw(requestParameters: WorkerServiceReinitializeCertificateAuthorityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const queryParameters: any = {}; + + if (requestParameters['scopeId'] != null) { + queryParameters['scope_id'] = requestParameters['scopeId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers:reinitialize-certificate-authority`, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON(jsonValue)); + } + + /** + * Reinitializes root certificates used for worker authentication. + */ + async workerServiceReinitializeCertificateAuthority(requestParameters: WorkerServiceReinitializeCertificateAuthorityRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceReinitializeCertificateAuthorityRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Removes api tags from an existing Worker. + */ + async workerServiceRemoveWorkerTagsRaw(requestParameters: WorkerServiceRemoveWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling workerServiceRemoveWorkerTags().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling workerServiceRemoveWorkerTags().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers/{id}:remove-worker-tags`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue)); + } + + /** + * Removes api tags from an existing Worker. + */ + async workerServiceRemoveWorkerTags(requestParameters: WorkerServiceRemoveWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceRemoveWorkerTagsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Sets api tags for an existing Worker. + */ + async workerServiceSetWorkerTagsRaw(requestParameters: WorkerServiceSetWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling workerServiceSetWorkerTags().' + ); + } + + if (requestParameters['body'] == null) { + throw new runtime.RequiredError( + 'body', + 'Required parameter "body" was null or undefined when calling workerServiceSetWorkerTags().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers/{id}:set-worker-tags`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyToJSON(requestParameters['body']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue)); + } + + /** + * Sets api tags for an existing Worker. + */ + async workerServiceSetWorkerTags(requestParameters: WorkerServiceSetWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceSetWorkerTagsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Updates a Worker. + */ + async workerServiceUpdateWorkerRaw(requestParameters: WorkerServiceUpdateWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + if (requestParameters['id'] == null) { + throw new runtime.RequiredError( + 'id', + 'Required parameter "id" was null or undefined when calling workerServiceUpdateWorker().' + ); + } + + if (requestParameters['item'] == null) { + throw new runtime.RequiredError( + 'item', + 'Required parameter "item" was null or undefined when calling workerServiceUpdateWorker().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (this.configuration && this.configuration.apiKey) { + headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication + } + + const response = await this.request({ + path: `/v1/workers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))), + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ControllerApiResourcesWorkersV1WorkerToJSON(requestParameters['item']), + }, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue)); + } + + /** + * Updates a Worker. + */ + async workerServiceUpdateWorker(requestParameters: WorkerServiceUpdateWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.workerServiceUpdateWorkerRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/e2e-tests/api-client/apis/index.ts b/e2e-tests/api-client/apis/index.ts new file mode 100644 index 000000000..2a10d00a5 --- /dev/null +++ b/e2e-tests/api-client/apis/index.ts @@ -0,0 +1,24 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './AccountServiceApi'; +export * from './AliasServiceApi'; +export * from './AuthMethodServiceApi'; +export * from './AuthTokenServiceApi'; +export * from './BillingServiceApi'; +export * from './CredentialLibraryServiceApi'; +export * from './CredentialServiceApi'; +export * from './CredentialStoreServiceApi'; +export * from './GroupServiceApi'; +export * from './HostCatalogServiceApi'; +export * from './HostServiceApi'; +export * from './HostSetServiceApi'; +export * from './ManagedGroupServiceApi'; +export * from './PolicyServiceApi'; +export * from './RoleServiceApi'; +export * from './ScopeServiceApi'; +export * from './SessionRecordingServiceApi'; +export * from './SessionServiceApi'; +export * from './StorageBucketServiceApi'; +export * from './TargetServiceApi'; +export * from './UserServiceApi'; +export * from './WorkerServiceApi'; diff --git a/e2e-tests/api-client/index.ts b/e2e-tests/api-client/index.ts new file mode 100644 index 000000000..bebe8bbbe --- /dev/null +++ b/e2e-tests/api-client/index.ts @@ -0,0 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './runtime'; +export * from './apis/index'; +export * from './models/index'; diff --git a/e2e-tests/api-client/models/ControllerApiResourcesAccountsV1Account.ts b/e2e-tests/api-client/models/ControllerApiResourcesAccountsV1Account.ts new file mode 100644 index 000000000..12e72ccd4 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesAccountsV1Account.ts @@ -0,0 +1,187 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesAccountsV1Account + */ +export interface ControllerApiResourcesAccountsV1Account { + /** + * The ID of the account. + * @type {string} + * @memberof ControllerApiResourcesAccountsV1Account + */ + readonly id?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesAccountsV1Account + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesAccountsV1Account + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesAccountsV1Account + */ + description?: string; + /** + * The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesAccountsV1Account + */ + readonly createdTime?: Date; + /** + * The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesAccountsV1Account + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation fails if the version does not match the latest known good version. + * Version is not required when you create an account. + * @type {number} + * @memberof ControllerApiResourcesAccountsV1Account + */ + version?: number; + /** + * The type of this account. If you do not set an account type, Boundary infers it from the type of the auth method. + * @type {string} + * @memberof ControllerApiResourcesAccountsV1Account + */ + type?: string; + /** + * The ID of the auth method that is associated with this account. + * @type {string} + * @memberof ControllerApiResourcesAccountsV1Account + */ + authMethodId?: string; + /** + * The attributes that are applicable for the specific account type. The schema of this field depends on the type of the auth method that you create the account in. + * For password auth methods, the parameters are: + * ```json + * { + * "login_name": "login_name", + * "password": "password" + * } + * ``` + * For OIDC auth methods, the parameters are: + * ```json + * { + * "issuer": "issuer", + * "subject": "subject", + * "full_name": "full_name", + * "email": "email", + * "token_claims": {}, + * "userinfo_claims": {} + * } + * ``` + * For LDAP auth methods, the parameters are: + * ```json + * { + * "login_name": "login_name", + * "full_name": "full_name", + * "email": "email", + * "dn": "dn", + * "member_of_groups": ["member_of_groups"] + * } + * ``` + * + * @type {object} + * @memberof ControllerApiResourcesAccountsV1Account + */ + attributes?: object; + /** + * + * @type {Array} + * @memberof ControllerApiResourcesAccountsV1Account + */ + readonly managedGroupIds?: Array; + /** + * The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesAccountsV1Account + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesAccountsV1Account interface. + */ +export function instanceOfControllerApiResourcesAccountsV1Account(value: object): value is ControllerApiResourcesAccountsV1Account { + return true; +} + +export function ControllerApiResourcesAccountsV1AccountFromJSON(json: any): ControllerApiResourcesAccountsV1Account { + return ControllerApiResourcesAccountsV1AccountFromJSONTyped(json, false); +} + +export function ControllerApiResourcesAccountsV1AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesAccountsV1Account { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'authMethodId': json['auth_method_id'] == null ? undefined : json['auth_method_id'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'managedGroupIds': json['managed_group_ids'] == null ? undefined : json['managed_group_ids'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesAccountsV1AccountToJSON(json: any): ControllerApiResourcesAccountsV1Account { + return ControllerApiResourcesAccountsV1AccountToJSONTyped(json, false); +} + +export function ControllerApiResourcesAccountsV1AccountToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'auth_method_id': value['authMethodId'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesAliasesV1Alias.ts b/e2e-tests/api-client/models/ControllerApiResourcesAliasesV1Alias.ts new file mode 100644 index 000000000..17034de80 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesAliasesV1Alias.ts @@ -0,0 +1,175 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesAliasesV1Alias + */ +export interface ControllerApiResourcesAliasesV1Alias { + /** + * The ID of the alias. + * @type {string} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + readonly id?: string; + /** + * The ID of the scope of which this alias is a part. + * @type {string} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional user-set name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + name?: string; + /** + * Optional user-set descripton for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + description?: string; + /** + * The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + readonly createdTime?: Date; + /** + * The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation fails if the version does not match the latest known good version. + * Version is not required when you create an alias. + * @type {number} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + version?: number; + /** + * Value of the alias. This is the value referenced by the user that + * is resolved to the destination id. + * @type {string} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + value?: string; + /** + * destination_id is the id of the resource that this alias points to. + * @type {string} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + destinationId?: string; + /** + * type is the type of the alias. + * @type {string} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + type?: string; + /** + * The attributes that are applicable for the specific alias type. The schema of this field depends on the type of resource that you create the alias for. + * For target aliases, the parameters are: + * ```json + * { + * "authorize_session_arguments": {"host_id":"host_id"} + * } + * ``` + * + * @type {object} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + attributes?: object; + /** + * The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesAliasesV1Alias + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesAliasesV1Alias interface. + */ +export function instanceOfControllerApiResourcesAliasesV1Alias(value: object): value is ControllerApiResourcesAliasesV1Alias { + return true; +} + +export function ControllerApiResourcesAliasesV1AliasFromJSON(json: any): ControllerApiResourcesAliasesV1Alias { + return ControllerApiResourcesAliasesV1AliasFromJSONTyped(json, false); +} + +export function ControllerApiResourcesAliasesV1AliasFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesAliasesV1Alias { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'value': json['value'] == null ? undefined : json['value'], + 'destinationId': json['destination_id'] == null ? undefined : json['destination_id'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesAliasesV1AliasToJSON(json: any): ControllerApiResourcesAliasesV1Alias { + return ControllerApiResourcesAliasesV1AliasToJSONTyped(json, false); +} + +export function ControllerApiResourcesAliasesV1AliasToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'value': value['value'], + 'destination_id': value['destinationId'], + 'type': value['type'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesAuthmethodsV1AuthMethod.ts b/e2e-tests/api-client/models/ControllerApiResourcesAuthmethodsV1AuthMethod.ts new file mode 100644 index 000000000..aea28f10c --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesAuthmethodsV1AuthMethod.ts @@ -0,0 +1,218 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesAuthmethodsV1AuthMethod + */ +export interface ControllerApiResourcesAuthmethodsV1AuthMethod { + /** + * The ID of the auth method. + * @type {string} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + readonly id?: string; + /** + * The ID of the Scope of which this auth method is a part. + * @type {string} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + description?: string; + /** + * The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + readonly createdTime?: Date; + /** + * The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * Version is not required when you create an auth method. + * @type {number} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + version?: number; + /** + * The auth method type. + * @type {string} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + type?: string; + /** + * The attributes that are applicable for the specific auth method type. The schema of this field depends on the type of the auth method that you create want to create. + * For password auth methods, the parameters are: + * ```json + * { + * "min_login_name_length": "min_login_name_length", + * "min_password_length": "min_password_length" + * } + * ``` + * For OIDC auth methods, the parameters are: + * ```json + * { + * "issuer": "issuer", + * "client_id": "client_id", + * "client_secret": "client_secret", + * "max_age": 3600, + * "signing_algorithms": [], + * "api_url_prefix": "api_url_prefix", + * "idp_ca_certs": [], + * "allowed_audiences": [], + * "claims_scopes": [], + * "account_claim_maps": [], + * "disable_discovered_config_validation": false, + * "prompts": [] + * } + * ``` + * For LDAP auth methods, the parameters are: + * ```json + * { + * "start_tls": false, + * "insecure_tls": false, + * "discover_dn": false, + * "anon_group_search": false, + * "upn_domain": "upn_domain", + * "urls": [], + * "user_dn": "user_dn", + * "user_attr": "user_attr", + * "user_filter": "user_filter", + * "enable_groups": false, + * "group_dn": "group_dn", + * "group_attr": "group_attr", + * "group_filter": "group_filter", + * "certificates": [], + * "client_certificate": "client_certificate", + * "client_certificate_key": "client_certificate_key", + * "bind_dn": "bind_dn", + * "bind_password": "bind_password", + * "use_token_groups": false, + * "account_attribute_maps": [], + * "maximum_page_size": 1000, + * "dereference_aliases": "never" + * } + * ``` + * + * @type {object} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + attributes?: object; + /** + * Whether this auth method is the primary auth method for it's scope. + * To change this value update the primary_auth_method_id field on the scope. + * @type {boolean} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + readonly isPrimary?: boolean; + /** + * The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + readonly authorizedActions?: Array; + /** + * The authorized actions for the scope's collections. + * @type {{ [key: string]: Array; }} + * @memberof ControllerApiResourcesAuthmethodsV1AuthMethod + */ + readonly authorizedCollectionActions?: { [key: string]: Array; }; +} + +/** + * Check if a given object implements the ControllerApiResourcesAuthmethodsV1AuthMethod interface. + */ +export function instanceOfControllerApiResourcesAuthmethodsV1AuthMethod(value: object): value is ControllerApiResourcesAuthmethodsV1AuthMethod { + return true; +} + +export function ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(json: any): ControllerApiResourcesAuthmethodsV1AuthMethod { + return ControllerApiResourcesAuthmethodsV1AuthMethodFromJSONTyped(json, false); +} + +export function ControllerApiResourcesAuthmethodsV1AuthMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesAuthmethodsV1AuthMethod { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'isPrimary': json['is_primary'] == null ? undefined : json['is_primary'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + 'authorizedCollectionActions': json['authorized_collection_actions'] == null ? undefined : json['authorized_collection_actions'], + }; +} + +export function ControllerApiResourcesAuthmethodsV1AuthMethodToJSON(json: any): ControllerApiResourcesAuthmethodsV1AuthMethod { + return ControllerApiResourcesAuthmethodsV1AuthMethodToJSONTyped(json, false); +} + +export function ControllerApiResourcesAuthmethodsV1AuthMethodToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesAuthtokensV1AuthToken.ts b/e2e-tests/api-client/models/ControllerApiResourcesAuthtokensV1AuthToken.ts new file mode 100644 index 000000000..23f19046e --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesAuthtokensV1AuthToken.ts @@ -0,0 +1,151 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesAuthtokensV1AuthToken + */ +export interface ControllerApiResourcesAuthtokensV1AuthToken { + /** + * Output only. The ID of the Auth Token. + * @type {string} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + readonly id?: string; + /** + * The Scope in which this Auth Token was generated. + * @type {string} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Output only. The token value, which will only be populated after authentication and is only ever visible to the end user whose login request resulted in this Auth Token being created. + * @type {string} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + readonly token?: string; + /** + * Output only. The ID of the User associated with this Auth Token. + * @type {string} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + readonly userId?: string; + /** + * Output only. The ID of the Auth Method associated with this Auth Token. + * @type {string} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + readonly authMethodId?: string; + /** + * Output only. The ID of the Account associated with this Auth Token. + * @type {string} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + readonly accountId?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + readonly updatedTime?: Date; + /** + * Output only. The approximate time this Auth Token was last used. + * @type {Date} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + readonly approximateLastUsedTime?: Date; + /** + * Output only. The time this Auth Token expires. + * @type {Date} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + readonly expirationTime?: Date; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesAuthtokensV1AuthToken + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesAuthtokensV1AuthToken interface. + */ +export function instanceOfControllerApiResourcesAuthtokensV1AuthToken(value: object): value is ControllerApiResourcesAuthtokensV1AuthToken { + return true; +} + +export function ControllerApiResourcesAuthtokensV1AuthTokenFromJSON(json: any): ControllerApiResourcesAuthtokensV1AuthToken { + return ControllerApiResourcesAuthtokensV1AuthTokenFromJSONTyped(json, false); +} + +export function ControllerApiResourcesAuthtokensV1AuthTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesAuthtokensV1AuthToken { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'token': json['token'] == null ? undefined : json['token'], + 'userId': json['user_id'] == null ? undefined : json['user_id'], + 'authMethodId': json['auth_method_id'] == null ? undefined : json['auth_method_id'], + 'accountId': json['account_id'] == null ? undefined : json['account_id'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'approximateLastUsedTime': json['approximate_last_used_time'] == null ? undefined : (new Date(json['approximate_last_used_time'])), + 'expirationTime': json['expiration_time'] == null ? undefined : (new Date(json['expiration_time'])), + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesAuthtokensV1AuthTokenToJSON(json: any): ControllerApiResourcesAuthtokensV1AuthToken { + return ControllerApiResourcesAuthtokensV1AuthTokenToJSONTyped(json, false); +} + +export function ControllerApiResourcesAuthtokensV1AuthTokenToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesBillingV1ActiveUsers.ts b/e2e-tests/api-client/models/ControllerApiResourcesBillingV1ActiveUsers.ts new file mode 100644 index 000000000..16a2f79e2 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesBillingV1ActiveUsers.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesBillingV1ActiveUsers + */ +export interface ControllerApiResourcesBillingV1ActiveUsers { + /** + * Output only. The number of active users between the start time and end time. + * @type {number} + * @memberof ControllerApiResourcesBillingV1ActiveUsers + */ + readonly count?: number; + /** + * Output only. The start time of the active users count, inclusive. + * @type {Date} + * @memberof ControllerApiResourcesBillingV1ActiveUsers + */ + readonly startTime?: Date; + /** + * Output only. The end time of the active users count, exclusive. + * @type {Date} + * @memberof ControllerApiResourcesBillingV1ActiveUsers + */ + readonly endTime?: Date; +} + +/** + * Check if a given object implements the ControllerApiResourcesBillingV1ActiveUsers interface. + */ +export function instanceOfControllerApiResourcesBillingV1ActiveUsers(value: object): value is ControllerApiResourcesBillingV1ActiveUsers { + return true; +} + +export function ControllerApiResourcesBillingV1ActiveUsersFromJSON(json: any): ControllerApiResourcesBillingV1ActiveUsers { + return ControllerApiResourcesBillingV1ActiveUsersFromJSONTyped(json, false); +} + +export function ControllerApiResourcesBillingV1ActiveUsersFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesBillingV1ActiveUsers { + if (json == null) { + return json; + } + return { + + 'count': json['count'] == null ? undefined : json['count'], + 'startTime': json['start_time'] == null ? undefined : (new Date(json['start_time'])), + 'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])), + }; +} + +export function ControllerApiResourcesBillingV1ActiveUsersToJSON(json: any): ControllerApiResourcesBillingV1ActiveUsers { + return ControllerApiResourcesBillingV1ActiveUsersToJSONTyped(json, false); +} + +export function ControllerApiResourcesBillingV1ActiveUsersToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesCredentiallibrariesV1CredentialLibrary.ts b/e2e-tests/api-client/models/ControllerApiResourcesCredentiallibrariesV1CredentialLibrary.ts new file mode 100644 index 000000000..485bdcde8 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesCredentiallibrariesV1CredentialLibrary.ts @@ -0,0 +1,166 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ +export interface ControllerApiResourcesCredentiallibrariesV1CredentialLibrary { + /** + * Output only. The ID of the Credential Library. + * @type {string} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + readonly id?: string; + /** + * The ID of the Credential Store of which this Credential Library is a part. + * @type {string} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + credentialStoreId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + version?: number; + /** + * The Credential Library type. + * @type {string} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + type?: string; + /** + * The attributes that are applicable for the specific Credential Library type. + * @type {object} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + attributes?: object; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + readonly authorizedActions?: Array; + /** + * + * @type {string} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + credentialType?: string; + /** + * + * @type {object} + * @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary + */ + credentialMappingOverrides?: object; +} + +/** + * Check if a given object implements the ControllerApiResourcesCredentiallibrariesV1CredentialLibrary interface. + */ +export function instanceOfControllerApiResourcesCredentiallibrariesV1CredentialLibrary(value: object): value is ControllerApiResourcesCredentiallibrariesV1CredentialLibrary { + return true; +} + +export function ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(json: any): ControllerApiResourcesCredentiallibrariesV1CredentialLibrary { + return ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSONTyped(json, false); +} + +export function ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesCredentiallibrariesV1CredentialLibrary { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'credentialStoreId': json['credential_store_id'] == null ? undefined : json['credential_store_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + 'credentialType': json['credential_type'] == null ? undefined : json['credential_type'], + 'credentialMappingOverrides': json['credential_mapping_overrides'] == null ? undefined : json['credential_mapping_overrides'], + }; +} + +export function ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON(json: any): ControllerApiResourcesCredentiallibrariesV1CredentialLibrary { + return ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSONTyped(json, false); +} + +export function ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'credential_store_id': value['credentialStoreId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'attributes': value['attributes'], + 'credential_type': value['credentialType'], + 'credential_mapping_overrides': value['credentialMappingOverrides'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesCredentialsV1Credential.ts b/e2e-tests/api-client/models/ControllerApiResourcesCredentialsV1Credential.ts new file mode 100644 index 000000000..8ae1f5f21 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesCredentialsV1Credential.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesCredentialsV1Credential + */ +export interface ControllerApiResourcesCredentialsV1Credential { + /** + * Output only. The ID of the Credential. + * @type {string} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + readonly id?: string; + /** + * The ID of the Credential Store of which this Credential is a part. + * @type {string} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + credentialStoreId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + version?: number; + /** + * The Credential type. + * @type {string} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + type?: string; + /** + * The attributes that are applicable for the specific Credential type. + * @type {object} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + attributes?: object; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesCredentialsV1Credential + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesCredentialsV1Credential interface. + */ +export function instanceOfControllerApiResourcesCredentialsV1Credential(value: object): value is ControllerApiResourcesCredentialsV1Credential { + return true; +} + +export function ControllerApiResourcesCredentialsV1CredentialFromJSON(json: any): ControllerApiResourcesCredentialsV1Credential { + return ControllerApiResourcesCredentialsV1CredentialFromJSONTyped(json, false); +} + +export function ControllerApiResourcesCredentialsV1CredentialFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesCredentialsV1Credential { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'credentialStoreId': json['credential_store_id'] == null ? undefined : json['credential_store_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesCredentialsV1CredentialToJSON(json: any): ControllerApiResourcesCredentialsV1Credential { + return ControllerApiResourcesCredentialsV1CredentialToJSONTyped(json, false); +} + +export function ControllerApiResourcesCredentialsV1CredentialToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'credential_store_id': value['credentialStoreId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesCredentialstoresV1CredentialStore.ts b/e2e-tests/api-client/models/ControllerApiResourcesCredentialstoresV1CredentialStore.ts new file mode 100644 index 000000000..894536812 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesCredentialstoresV1CredentialStore.ts @@ -0,0 +1,157 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesCredentialstoresV1CredentialStore + */ +export interface ControllerApiResourcesCredentialstoresV1CredentialStore { + /** + * Output only. The ID of the Credential Store. + * @type {string} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + readonly id?: string; + /** + * The ID of the Scope of which this Credential Store is a part. + * @type {string} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + version?: number; + /** + * The Credential Store type. + * @type {string} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + type?: string; + /** + * The attributes that are applicable for the specific Credential Store type. + * @type {object} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + attributes?: object; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + readonly authorizedActions?: Array; + /** + * Output only. The authorized actions for the scope's collections. + * @type {{ [key: string]: Array; }} + * @memberof ControllerApiResourcesCredentialstoresV1CredentialStore + */ + readonly authorizedCollectionActions?: { [key: string]: Array; }; +} + +/** + * Check if a given object implements the ControllerApiResourcesCredentialstoresV1CredentialStore interface. + */ +export function instanceOfControllerApiResourcesCredentialstoresV1CredentialStore(value: object): value is ControllerApiResourcesCredentialstoresV1CredentialStore { + return true; +} + +export function ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(json: any): ControllerApiResourcesCredentialstoresV1CredentialStore { + return ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSONTyped(json, false); +} + +export function ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesCredentialstoresV1CredentialStore { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + 'authorizedCollectionActions': json['authorized_collection_actions'] == null ? undefined : json['authorized_collection_actions'], + }; +} + +export function ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON(json: any): ControllerApiResourcesCredentialstoresV1CredentialStore { + return ControllerApiResourcesCredentialstoresV1CredentialStoreToJSONTyped(json, false); +} + +export function ControllerApiResourcesCredentialstoresV1CredentialStoreToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesGroupsV1Group.ts b/e2e-tests/api-client/models/ControllerApiResourcesGroupsV1Group.ts new file mode 100644 index 000000000..1a65e5316 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesGroupsV1Group.ts @@ -0,0 +1,155 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; +import type { ControllerApiResourcesGroupsV1Member } from './ControllerApiResourcesGroupsV1Member'; +import { + ControllerApiResourcesGroupsV1MemberFromJSON, + ControllerApiResourcesGroupsV1MemberFromJSONTyped, + ControllerApiResourcesGroupsV1MemberToJSON, + ControllerApiResourcesGroupsV1MemberToJSONTyped, +} from './ControllerApiResourcesGroupsV1Member'; + +/** + * + * @export + * @interface ControllerApiResourcesGroupsV1Group + */ +export interface ControllerApiResourcesGroupsV1Group { + /** + * Output only. The ID of the Group. + * @type {string} + * @memberof ControllerApiResourcesGroupsV1Group + */ + readonly id?: string; + /** + * The ID of the scope of which this Group is a part. + * @type {string} + * @memberof ControllerApiResourcesGroupsV1Group + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesGroupsV1Group + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesGroupsV1Group + */ + name?: string; + /** + * Optional user-set descripton for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesGroupsV1Group + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesGroupsV1Group + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesGroupsV1Group + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesGroupsV1Group + */ + version?: number; + /** + * Output only. Contains the list of member IDs in this Group. + * @type {Array} + * @memberof ControllerApiResourcesGroupsV1Group + */ + readonly memberIds?: Array; + /** + * Output only. The members of this Group. + * @type {Array} + * @memberof ControllerApiResourcesGroupsV1Group + */ + readonly members?: Array; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesGroupsV1Group + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesGroupsV1Group interface. + */ +export function instanceOfControllerApiResourcesGroupsV1Group(value: object): value is ControllerApiResourcesGroupsV1Group { + return true; +} + +export function ControllerApiResourcesGroupsV1GroupFromJSON(json: any): ControllerApiResourcesGroupsV1Group { + return ControllerApiResourcesGroupsV1GroupFromJSONTyped(json, false); +} + +export function ControllerApiResourcesGroupsV1GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesGroupsV1Group { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'memberIds': json['member_ids'] == null ? undefined : json['member_ids'], + 'members': json['members'] == null ? undefined : ((json['members'] as Array).map(ControllerApiResourcesGroupsV1MemberFromJSON)), + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesGroupsV1GroupToJSON(json: any): ControllerApiResourcesGroupsV1Group { + return ControllerApiResourcesGroupsV1GroupToJSONTyped(json, false); +} + +export function ControllerApiResourcesGroupsV1GroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesGroupsV1Member.ts b/e2e-tests/api-client/models/ControllerApiResourcesGroupsV1Member.ts new file mode 100644 index 000000000..2a76e7b09 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesGroupsV1Member.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesGroupsV1Member + */ +export interface ControllerApiResourcesGroupsV1Member { + /** + * Output only. The ID of the member. + * @type {string} + * @memberof ControllerApiResourcesGroupsV1Member + */ + readonly id?: string; + /** + * Output only. The Scope ID of the member. + * @type {string} + * @memberof ControllerApiResourcesGroupsV1Member + */ + readonly scopeId?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesGroupsV1Member interface. + */ +export function instanceOfControllerApiResourcesGroupsV1Member(value: object): value is ControllerApiResourcesGroupsV1Member { + return true; +} + +export function ControllerApiResourcesGroupsV1MemberFromJSON(json: any): ControllerApiResourcesGroupsV1Member { + return ControllerApiResourcesGroupsV1MemberFromJSONTyped(json, false); +} + +export function ControllerApiResourcesGroupsV1MemberFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesGroupsV1Member { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + }; +} + +export function ControllerApiResourcesGroupsV1MemberToJSON(json: any): ControllerApiResourcesGroupsV1Member { + return ControllerApiResourcesGroupsV1MemberToJSONTyped(json, false); +} + +export function ControllerApiResourcesGroupsV1MemberToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesHostcatalogsV1HostCatalog.ts b/e2e-tests/api-client/models/ControllerApiResourcesHostcatalogsV1HostCatalog.ts new file mode 100644 index 000000000..1dbc0a549 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesHostcatalogsV1HostCatalog.ts @@ -0,0 +1,203 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesPluginsV1PluginInfo } from './ControllerApiResourcesPluginsV1PluginInfo'; +import { + ControllerApiResourcesPluginsV1PluginInfoFromJSON, + ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped, + ControllerApiResourcesPluginsV1PluginInfoToJSON, + ControllerApiResourcesPluginsV1PluginInfoToJSONTyped, +} from './ControllerApiResourcesPluginsV1PluginInfo'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesHostcatalogsV1HostCatalog + */ +export interface ControllerApiResourcesHostcatalogsV1HostCatalog { + /** + * Output only. The ID of the host. + * @type {string} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + readonly id?: string; + /** + * The ID of the Scope of which this Host Catalog is a part. + * @type {string} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * The ID of the plugin of which this catalog is created. + * @type {string} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + pluginId?: string; + /** + * + * @type {ControllerApiResourcesPluginsV1PluginInfo} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + plugin?: ControllerApiResourcesPluginsV1PluginInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + version?: number; + /** + * The type of Host Catalog. + * @type {string} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + type?: string; + /** + * Attributes specific to the catalog type. + * @type {object} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + attributes?: object; + /** + * Secrets specific to the catalog type. These are never output. + * @type {object} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + secrets?: object; + /** + * Output only. The HMAC of the last secrets supplied via the API, if any. + * @type {string} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + readonly secretsHmac?: string; + /** + * Optional worker filter for plugin-subtype host catalogs. Boundary Enterprise only. + * @type {string} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + workerFilter?: string; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + readonly authorizedActions?: Array; + /** + * Output only. The authorized actions for the scope's collections. + * @type {{ [key: string]: Array; }} + * @memberof ControllerApiResourcesHostcatalogsV1HostCatalog + */ + readonly authorizedCollectionActions?: { [key: string]: Array; }; +} + +/** + * Check if a given object implements the ControllerApiResourcesHostcatalogsV1HostCatalog interface. + */ +export function instanceOfControllerApiResourcesHostcatalogsV1HostCatalog(value: object): value is ControllerApiResourcesHostcatalogsV1HostCatalog { + return true; +} + +export function ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(json: any): ControllerApiResourcesHostcatalogsV1HostCatalog { + return ControllerApiResourcesHostcatalogsV1HostCatalogFromJSONTyped(json, false); +} + +export function ControllerApiResourcesHostcatalogsV1HostCatalogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesHostcatalogsV1HostCatalog { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'pluginId': json['plugin_id'] == null ? undefined : json['plugin_id'], + 'plugin': json['plugin'] == null ? undefined : ControllerApiResourcesPluginsV1PluginInfoFromJSON(json['plugin']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'secrets': json['secrets'] == null ? undefined : json['secrets'], + 'secretsHmac': json['secrets_hmac'] == null ? undefined : json['secrets_hmac'], + 'workerFilter': json['worker_filter'] == null ? undefined : json['worker_filter'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + 'authorizedCollectionActions': json['authorized_collection_actions'] == null ? undefined : json['authorized_collection_actions'], + }; +} + +export function ControllerApiResourcesHostcatalogsV1HostCatalogToJSON(json: any): ControllerApiResourcesHostcatalogsV1HostCatalog { + return ControllerApiResourcesHostcatalogsV1HostCatalogToJSONTyped(json, false); +} + +export function ControllerApiResourcesHostcatalogsV1HostCatalogToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'plugin_id': value['pluginId'], + 'plugin': ControllerApiResourcesPluginsV1PluginInfoToJSON(value['plugin']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'attributes': value['attributes'], + 'secrets': value['secrets'], + 'worker_filter': value['workerFilter'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesHostsV1Host.ts b/e2e-tests/api-client/models/ControllerApiResourcesHostsV1Host.ts new file mode 100644 index 000000000..a48e3efd0 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesHostsV1Host.ts @@ -0,0 +1,200 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesPluginsV1PluginInfo } from './ControllerApiResourcesPluginsV1PluginInfo'; +import { + ControllerApiResourcesPluginsV1PluginInfoFromJSON, + ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped, + ControllerApiResourcesPluginsV1PluginInfoToJSON, + ControllerApiResourcesPluginsV1PluginInfoToJSONTyped, +} from './ControllerApiResourcesPluginsV1PluginInfo'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesHostsV1Host + */ +export interface ControllerApiResourcesHostsV1Host { + /** + * Output only. The ID of the Host. + * @type {string} + * @memberof ControllerApiResourcesHostsV1Host + */ + readonly id?: string; + /** + * The Host Catalog of which this Host is a part. + * @type {string} + * @memberof ControllerApiResourcesHostsV1Host + */ + hostCatalogId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesHostsV1Host + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * + * @type {ControllerApiResourcesPluginsV1PluginInfo} + * @memberof ControllerApiResourcesHostsV1Host + */ + plugin?: ControllerApiResourcesPluginsV1PluginInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesHostsV1Host + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesHostsV1Host + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesHostsV1Host + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesHostsV1Host + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesHostsV1Host + */ + version?: number; + /** + * The type of the resource. + * @type {string} + * @memberof ControllerApiResourcesHostsV1Host + */ + type?: string; + /** + * Output only. A list of Host Sets containing this Host. + * @type {Array} + * @memberof ControllerApiResourcesHostsV1Host + */ + readonly hostSetIds?: Array; + /** + * The attributes that are applicable to the specific Host type. + * @type {object} + * @memberof ControllerApiResourcesHostsV1Host + */ + attributes?: object; + /** + * Output only. The list of ip addresses associated with this host. + * @type {Array} + * @memberof ControllerApiResourcesHostsV1Host + */ + readonly ipAddresses?: Array; + /** + * Output only. The list of dns addresses associated with this host. + * @type {Array} + * @memberof ControllerApiResourcesHostsV1Host + */ + readonly dnsNames?: Array; + /** + * Output only. The external ID of the host, if any. + * @type {string} + * @memberof ControllerApiResourcesHostsV1Host + */ + readonly externalId?: string; + /** + * Output only. Refers to the name for a given host provided by the plugin enabled backing service. + * @type {string} + * @memberof ControllerApiResourcesHostsV1Host + */ + readonly externalName?: string; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesHostsV1Host + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesHostsV1Host interface. + */ +export function instanceOfControllerApiResourcesHostsV1Host(value: object): value is ControllerApiResourcesHostsV1Host { + return true; +} + +export function ControllerApiResourcesHostsV1HostFromJSON(json: any): ControllerApiResourcesHostsV1Host { + return ControllerApiResourcesHostsV1HostFromJSONTyped(json, false); +} + +export function ControllerApiResourcesHostsV1HostFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesHostsV1Host { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'hostCatalogId': json['host_catalog_id'] == null ? undefined : json['host_catalog_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'plugin': json['plugin'] == null ? undefined : ControllerApiResourcesPluginsV1PluginInfoFromJSON(json['plugin']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'hostSetIds': json['host_set_ids'] == null ? undefined : json['host_set_ids'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'ipAddresses': json['ip_addresses'] == null ? undefined : json['ip_addresses'], + 'dnsNames': json['dns_names'] == null ? undefined : json['dns_names'], + 'externalId': json['external_id'] == null ? undefined : json['external_id'], + 'externalName': json['external_name'] == null ? undefined : json['external_name'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesHostsV1HostToJSON(json: any): ControllerApiResourcesHostsV1Host { + return ControllerApiResourcesHostsV1HostToJSONTyped(json, false); +} + +export function ControllerApiResourcesHostsV1HostToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'host_catalog_id': value['hostCatalogId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'plugin': ControllerApiResourcesPluginsV1PluginInfoToJSON(value['plugin']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesHostsetsV1HostSet.ts b/e2e-tests/api-client/models/ControllerApiResourcesHostsetsV1HostSet.ts new file mode 100644 index 000000000..64be2f713 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesHostsetsV1HostSet.ts @@ -0,0 +1,198 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesPluginsV1PluginInfo } from './ControllerApiResourcesPluginsV1PluginInfo'; +import { + ControllerApiResourcesPluginsV1PluginInfoFromJSON, + ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped, + ControllerApiResourcesPluginsV1PluginInfoToJSON, + ControllerApiResourcesPluginsV1PluginInfoToJSONTyped, +} from './ControllerApiResourcesPluginsV1PluginInfo'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesHostsetsV1HostSet + */ +export interface ControllerApiResourcesHostsetsV1HostSet { + /** + * Output only. The ID of the Host Set. + * @type {string} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + readonly id?: string; + /** + * The Host Catalog of which this Host Set is a part. + * @type {string} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + hostCatalogId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * + * @type {ControllerApiResourcesPluginsV1PluginInfo} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + plugin?: ControllerApiResourcesPluginsV1PluginInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + version?: number; + /** + * The type of the Host Set. + * @type {string} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + type?: string; + /** + * Output only. A list of Hosts in this Host Set. + * @type {Array} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + readonly hostIds?: Array; + /** + * multiple possible endpoints for a host. Preferences are specified by + * "cidr:" or "dns:", specifying which IP + * address or DNS name out of a host's available possibilities should be + * preferred. If no preferences are specified, a value will be chosen from + * among all avialable values using a built-in priority order. May not be + * valid for all plugin types. + * @type {Array} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + preferredEndpoints?: Array; + /** + * An interger number of seconds indicating the amount of time that should + * elapse between syncs of the host set. The interval will be applied to the + * end of the previous sync operation, not the start. Setting to -1 will + * disable syncing for that host set; setting to zero will cause the set to + * use Boundary's default. The default may change between releases. May not + * be valid for all plugin types. + * @type {number} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + syncIntervalSeconds?: number; + /** + * The attributes that are applicable for the specific Host Set type. + * @type {object} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + attributes?: object; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesHostsetsV1HostSet + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesHostsetsV1HostSet interface. + */ +export function instanceOfControllerApiResourcesHostsetsV1HostSet(value: object): value is ControllerApiResourcesHostsetsV1HostSet { + return true; +} + +export function ControllerApiResourcesHostsetsV1HostSetFromJSON(json: any): ControllerApiResourcesHostsetsV1HostSet { + return ControllerApiResourcesHostsetsV1HostSetFromJSONTyped(json, false); +} + +export function ControllerApiResourcesHostsetsV1HostSetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesHostsetsV1HostSet { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'hostCatalogId': json['host_catalog_id'] == null ? undefined : json['host_catalog_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'plugin': json['plugin'] == null ? undefined : ControllerApiResourcesPluginsV1PluginInfoFromJSON(json['plugin']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'hostIds': json['host_ids'] == null ? undefined : json['host_ids'], + 'preferredEndpoints': json['preferred_endpoints'] == null ? undefined : json['preferred_endpoints'], + 'syncIntervalSeconds': json['sync_interval_seconds'] == null ? undefined : json['sync_interval_seconds'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesHostsetsV1HostSetToJSON(json: any): ControllerApiResourcesHostsetsV1HostSet { + return ControllerApiResourcesHostsetsV1HostSetToJSONTyped(json, false); +} + +export function ControllerApiResourcesHostsetsV1HostSetToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'host_catalog_id': value['hostCatalogId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'plugin': ControllerApiResourcesPluginsV1PluginInfoToJSON(value['plugin']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'preferred_endpoints': value['preferredEndpoints'], + 'sync_interval_seconds': value['syncIntervalSeconds'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesManagedgroupsV1ManagedGroup.ts b/e2e-tests/api-client/models/ControllerApiResourcesManagedgroupsV1ManagedGroup.ts new file mode 100644 index 000000000..f90718dbf --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesManagedgroupsV1ManagedGroup.ts @@ -0,0 +1,157 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesManagedgroupsV1ManagedGroup + */ +export interface ControllerApiResourcesManagedgroupsV1ManagedGroup { + /** + * Output only. The ID of the ManagedGroup. + * @type {string} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + readonly id?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + version?: number; + /** + * The type of this ManagedGroup. + * @type {string} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + type?: string; + /** + * The ID of the Auth Method that is associated with this ManagedGroup. + * @type {string} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + authMethodId?: string; + /** + * The attributes that are applicable for the specific ManagedGroup type. + * @type {object} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + attributes?: object; + /** + * Output only. The IDs of the current set of members (accounts) that are associated with this ManagedGroup. + * @type {Array} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + readonly memberIds?: Array; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesManagedgroupsV1ManagedGroup interface. + */ +export function instanceOfControllerApiResourcesManagedgroupsV1ManagedGroup(value: object): value is ControllerApiResourcesManagedgroupsV1ManagedGroup { + return true; +} + +export function ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(json: any): ControllerApiResourcesManagedgroupsV1ManagedGroup { + return ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSONTyped(json, false); +} + +export function ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesManagedgroupsV1ManagedGroup { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'authMethodId': json['auth_method_id'] == null ? undefined : json['auth_method_id'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'memberIds': json['member_ids'] == null ? undefined : json['member_ids'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON(json: any): ControllerApiResourcesManagedgroupsV1ManagedGroup { + return ControllerApiResourcesManagedgroupsV1ManagedGroupToJSONTyped(json, false); +} + +export function ControllerApiResourcesManagedgroupsV1ManagedGroupToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'auth_method_id': value['authMethodId'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesPluginsV1PluginInfo.ts b/e2e-tests/api-client/models/ControllerApiResourcesPluginsV1PluginInfo.ts new file mode 100644 index 000000000..8f5f8e48b --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesPluginsV1PluginInfo.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesPluginsV1PluginInfo + */ +export interface ControllerApiResourcesPluginsV1PluginInfo { + /** + * Output only. The ID of the Plugin. + * @type {string} + * @memberof ControllerApiResourcesPluginsV1PluginInfo + */ + readonly id?: string; + /** + * Output only. The name of the plugin resource in boundary, if any. + * @type {string} + * @memberof ControllerApiResourcesPluginsV1PluginInfo + */ + readonly name?: string; + /** + * Output only. The description of the plugin in boundary, if any. + * @type {string} + * @memberof ControllerApiResourcesPluginsV1PluginInfo + */ + readonly description?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesPluginsV1PluginInfo interface. + */ +export function instanceOfControllerApiResourcesPluginsV1PluginInfo(value: object): value is ControllerApiResourcesPluginsV1PluginInfo { + return true; +} + +export function ControllerApiResourcesPluginsV1PluginInfoFromJSON(json: any): ControllerApiResourcesPluginsV1PluginInfo { + return ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped(json, false); +} + +export function ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesPluginsV1PluginInfo { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + }; +} + +export function ControllerApiResourcesPluginsV1PluginInfoToJSON(json: any): ControllerApiResourcesPluginsV1PluginInfo { + return ControllerApiResourcesPluginsV1PluginInfoToJSONTyped(json, false); +} + +export function ControllerApiResourcesPluginsV1PluginInfoToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesPoliciesV1Policy.ts b/e2e-tests/api-client/models/ControllerApiResourcesPoliciesV1Policy.ts new file mode 100644 index 000000000..4eb57f727 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesPoliciesV1Policy.ts @@ -0,0 +1,152 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesPoliciesV1Policy + */ +export interface ControllerApiResourcesPoliciesV1Policy { + /** + * Output only. The id of the storage policy. + * @type {string} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + readonly id?: string; + /** + * The scope id of this policy. This must be defined for policy creation, but + * is otherwise output only. + * @type {string} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + readonly updatedTime?: Date; + /** + * The policy's type. + * @type {string} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + type?: string; + /** + * Version is used in mutation requests, after the initial creation, to ensure + * this resource has not changed. The mutation will fail if the version does + * not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + version?: number; + /** + * + * @type {object} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + attributes?: object; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesPoliciesV1Policy + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesPoliciesV1Policy interface. + */ +export function instanceOfControllerApiResourcesPoliciesV1Policy(value: object): value is ControllerApiResourcesPoliciesV1Policy { + return true; +} + +export function ControllerApiResourcesPoliciesV1PolicyFromJSON(json: any): ControllerApiResourcesPoliciesV1Policy { + return ControllerApiResourcesPoliciesV1PolicyFromJSONTyped(json, false); +} + +export function ControllerApiResourcesPoliciesV1PolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesPoliciesV1Policy { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'type': json['type'] == null ? undefined : json['type'], + 'version': json['version'] == null ? undefined : json['version'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesPoliciesV1PolicyToJSON(json: any): ControllerApiResourcesPoliciesV1Policy { + return ControllerApiResourcesPoliciesV1PolicyToJSONTyped(json, false); +} + +export function ControllerApiResourcesPoliciesV1PolicyToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'type': value['type'], + 'version': value['version'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesRolesV1Grant.ts b/e2e-tests/api-client/models/ControllerApiResourcesRolesV1Grant.ts new file mode 100644 index 000000000..35de340de --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesRolesV1Grant.ts @@ -0,0 +1,87 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1GrantJson } from './ControllerApiResourcesRolesV1GrantJson'; +import { + ControllerApiResourcesRolesV1GrantJsonFromJSON, + ControllerApiResourcesRolesV1GrantJsonFromJSONTyped, + ControllerApiResourcesRolesV1GrantJsonToJSON, + ControllerApiResourcesRolesV1GrantJsonToJSONTyped, +} from './ControllerApiResourcesRolesV1GrantJson'; + +/** + * + * @export + * @interface ControllerApiResourcesRolesV1Grant + */ +export interface ControllerApiResourcesRolesV1Grant { + /** + * Output only. The original user-supplied string. + * @type {string} + * @memberof ControllerApiResourcesRolesV1Grant + */ + readonly raw?: string; + /** + * Output only. The canonically-formatted string. + * @type {string} + * @memberof ControllerApiResourcesRolesV1Grant + */ + readonly canonical?: string; + /** + * + * @type {ControllerApiResourcesRolesV1GrantJson} + * @memberof ControllerApiResourcesRolesV1Grant + */ + json?: ControllerApiResourcesRolesV1GrantJson; +} + +/** + * Check if a given object implements the ControllerApiResourcesRolesV1Grant interface. + */ +export function instanceOfControllerApiResourcesRolesV1Grant(value: object): value is ControllerApiResourcesRolesV1Grant { + return true; +} + +export function ControllerApiResourcesRolesV1GrantFromJSON(json: any): ControllerApiResourcesRolesV1Grant { + return ControllerApiResourcesRolesV1GrantFromJSONTyped(json, false); +} + +export function ControllerApiResourcesRolesV1GrantFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesRolesV1Grant { + if (json == null) { + return json; + } + return { + + 'raw': json['raw'] == null ? undefined : json['raw'], + 'canonical': json['canonical'] == null ? undefined : json['canonical'], + 'json': json['json'] == null ? undefined : ControllerApiResourcesRolesV1GrantJsonFromJSON(json['json']), + }; +} + +export function ControllerApiResourcesRolesV1GrantToJSON(json: any): ControllerApiResourcesRolesV1Grant { + return ControllerApiResourcesRolesV1GrantToJSONTyped(json, false); +} + +export function ControllerApiResourcesRolesV1GrantToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'json': ControllerApiResourcesRolesV1GrantJsonToJSON(value['json']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesRolesV1GrantJson.ts b/e2e-tests/api-client/models/ControllerApiResourcesRolesV1GrantJson.ts new file mode 100644 index 000000000..9e993bd26 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesRolesV1GrantJson.ts @@ -0,0 +1,86 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesRolesV1GrantJson + */ +export interface ControllerApiResourcesRolesV1GrantJson { + /** + * Output only. The ID, if set. + * Deprecated: use "ids" instead. + * @type {string} + * @memberof ControllerApiResourcesRolesV1GrantJson + */ + readonly id?: string; + /** + * Output only. The IDs, if set. + * @type {Array} + * @memberof ControllerApiResourcesRolesV1GrantJson + */ + readonly ids?: Array; + /** + * Output only. The type, if set. + * @type {string} + * @memberof ControllerApiResourcesRolesV1GrantJson + */ + readonly type?: string; + /** + * Output only. The actions. + * @type {Array} + * @memberof ControllerApiResourcesRolesV1GrantJson + */ + readonly actions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesRolesV1GrantJson interface. + */ +export function instanceOfControllerApiResourcesRolesV1GrantJson(value: object): value is ControllerApiResourcesRolesV1GrantJson { + return true; +} + +export function ControllerApiResourcesRolesV1GrantJsonFromJSON(json: any): ControllerApiResourcesRolesV1GrantJson { + return ControllerApiResourcesRolesV1GrantJsonFromJSONTyped(json, false); +} + +export function ControllerApiResourcesRolesV1GrantJsonFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesRolesV1GrantJson { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'ids': json['ids'] == null ? undefined : json['ids'], + 'type': json['type'] == null ? undefined : json['type'], + 'actions': json['actions'] == null ? undefined : json['actions'], + }; +} + +export function ControllerApiResourcesRolesV1GrantJsonToJSON(json: any): ControllerApiResourcesRolesV1GrantJson { + return ControllerApiResourcesRolesV1GrantJsonToJSONTyped(json, false); +} + +export function ControllerApiResourcesRolesV1GrantJsonToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesRolesV1Principal.ts b/e2e-tests/api-client/models/ControllerApiResourcesRolesV1Principal.ts new file mode 100644 index 000000000..4bd2270cc --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesRolesV1Principal.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesRolesV1Principal + */ +export interface ControllerApiResourcesRolesV1Principal { + /** + * Output only. The ID of the principal. + * @type {string} + * @memberof ControllerApiResourcesRolesV1Principal + */ + readonly id?: string; + /** + * Output only. The type of the principal. + * @type {string} + * @memberof ControllerApiResourcesRolesV1Principal + */ + readonly type?: string; + /** + * Output only. The Scope of the principal. + * @type {string} + * @memberof ControllerApiResourcesRolesV1Principal + */ + readonly scopeId?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesRolesV1Principal interface. + */ +export function instanceOfControllerApiResourcesRolesV1Principal(value: object): value is ControllerApiResourcesRolesV1Principal { + return true; +} + +export function ControllerApiResourcesRolesV1PrincipalFromJSON(json: any): ControllerApiResourcesRolesV1Principal { + return ControllerApiResourcesRolesV1PrincipalFromJSONTyped(json, false); +} + +export function ControllerApiResourcesRolesV1PrincipalFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesRolesV1Principal { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'type': json['type'] == null ? undefined : json['type'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + }; +} + +export function ControllerApiResourcesRolesV1PrincipalToJSON(json: any): ControllerApiResourcesRolesV1Principal { + return ControllerApiResourcesRolesV1PrincipalToJSONTyped(json, false); +} + +export function ControllerApiResourcesRolesV1PrincipalToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesRolesV1Role.ts b/e2e-tests/api-client/models/ControllerApiResourcesRolesV1Role.ts new file mode 100644 index 000000000..197ac1bab --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesRolesV1Role.ts @@ -0,0 +1,189 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Principal } from './ControllerApiResourcesRolesV1Principal'; +import { + ControllerApiResourcesRolesV1PrincipalFromJSON, + ControllerApiResourcesRolesV1PrincipalFromJSONTyped, + ControllerApiResourcesRolesV1PrincipalToJSON, + ControllerApiResourcesRolesV1PrincipalToJSONTyped, +} from './ControllerApiResourcesRolesV1Principal'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; +import type { ControllerApiResourcesRolesV1Grant } from './ControllerApiResourcesRolesV1Grant'; +import { + ControllerApiResourcesRolesV1GrantFromJSON, + ControllerApiResourcesRolesV1GrantFromJSONTyped, + ControllerApiResourcesRolesV1GrantToJSON, + ControllerApiResourcesRolesV1GrantToJSONTyped, +} from './ControllerApiResourcesRolesV1Grant'; + +/** + * + * @export + * @interface ControllerApiResourcesRolesV1Role + */ +export interface ControllerApiResourcesRolesV1Role { + /** + * Output only. The ID of the Role. + * @type {string} + * @memberof ControllerApiResourcesRolesV1Role + */ + readonly id?: string; + /** + * The ID of the Scope containing this Role. + * @type {string} + * @memberof ControllerApiResourcesRolesV1Role + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesRolesV1Role + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesRolesV1Role + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesRolesV1Role + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesRolesV1Role + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesRolesV1Role + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesRolesV1Role + */ + version?: number; + /** + * Output only. The IDs of Scopes the grants will apply to. This can include + * the role's own scope ID, or "this" for the same behavior; specific IDs of + * scopes that are children of the role's scope; the value "children" to match + * all direct child scopes of the role's scope; or the value "descendants" to + * match all descendant scopes (e.g. child scopes, children of child scopes; + * only valid at "global" scope since it is the only one with children of + * children). + * @type {Array} + * @memberof ControllerApiResourcesRolesV1Role + */ + readonly grantScopeIds?: Array; + /** + * Output only. The IDs (only) of principals that are assigned to this role. + * @type {Array} + * @memberof ControllerApiResourcesRolesV1Role + */ + readonly principalIds?: Array; + /** + * Output only. The principals that are assigned to this role. + * @type {Array} + * @memberof ControllerApiResourcesRolesV1Role + */ + readonly principals?: Array; + /** + * Output only. The grants that this role provides for its principals. + * @type {Array} + * @memberof ControllerApiResourcesRolesV1Role + */ + readonly grantStrings?: Array; + /** + * Output only. The parsed grant information. + * @type {Array} + * @memberof ControllerApiResourcesRolesV1Role + */ + readonly grants?: Array; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesRolesV1Role + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesRolesV1Role interface. + */ +export function instanceOfControllerApiResourcesRolesV1Role(value: object): value is ControllerApiResourcesRolesV1Role { + return true; +} + +export function ControllerApiResourcesRolesV1RoleFromJSON(json: any): ControllerApiResourcesRolesV1Role { + return ControllerApiResourcesRolesV1RoleFromJSONTyped(json, false); +} + +export function ControllerApiResourcesRolesV1RoleFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesRolesV1Role { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'grantScopeIds': json['grant_scope_ids'] == null ? undefined : json['grant_scope_ids'], + 'principalIds': json['principal_ids'] == null ? undefined : json['principal_ids'], + 'principals': json['principals'] == null ? undefined : ((json['principals'] as Array).map(ControllerApiResourcesRolesV1PrincipalFromJSON)), + 'grantStrings': json['grant_strings'] == null ? undefined : json['grant_strings'], + 'grants': json['grants'] == null ? undefined : ((json['grants'] as Array).map(ControllerApiResourcesRolesV1GrantFromJSON)), + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesRolesV1RoleToJSON(json: any): ControllerApiResourcesRolesV1Role { + return ControllerApiResourcesRolesV1RoleToJSONTyped(json, false); +} + +export function ControllerApiResourcesRolesV1RoleToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesScopesV1Key.ts b/e2e-tests/api-client/models/ControllerApiResourcesScopesV1Key.ts new file mode 100644 index 000000000..a7064f40c --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesScopesV1Key.ts @@ -0,0 +1,120 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; +import type { ControllerApiResourcesScopesV1KeyVersion } from './ControllerApiResourcesScopesV1KeyVersion'; +import { + ControllerApiResourcesScopesV1KeyVersionFromJSON, + ControllerApiResourcesScopesV1KeyVersionFromJSONTyped, + ControllerApiResourcesScopesV1KeyVersionToJSON, + ControllerApiResourcesScopesV1KeyVersionToJSONTyped, +} from './ControllerApiResourcesScopesV1KeyVersion'; + +/** + * Key contains all fields related to a Key in a Scope. + * @export + * @interface ControllerApiResourcesScopesV1Key + */ +export interface ControllerApiResourcesScopesV1Key { + /** + * The ID of the Key. + * @type {string} + * @memberof ControllerApiResourcesScopesV1Key + */ + id?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesScopesV1Key + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * The purpose of the Key. + * @type {string} + * @memberof ControllerApiResourcesScopesV1Key + */ + purpose?: string; + /** + * The time this Key was created. + * @type {Date} + * @memberof ControllerApiResourcesScopesV1Key + */ + createdTime?: Date; + /** + * The type of the Key. + * @type {string} + * @memberof ControllerApiResourcesScopesV1Key + */ + type?: string; + /** + * The versions of the key. + * @type {Array} + * @memberof ControllerApiResourcesScopesV1Key + */ + versions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesScopesV1Key interface. + */ +export function instanceOfControllerApiResourcesScopesV1Key(value: object): value is ControllerApiResourcesScopesV1Key { + return true; +} + +export function ControllerApiResourcesScopesV1KeyFromJSON(json: any): ControllerApiResourcesScopesV1Key { + return ControllerApiResourcesScopesV1KeyFromJSONTyped(json, false); +} + +export function ControllerApiResourcesScopesV1KeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesScopesV1Key { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'purpose': json['purpose'] == null ? undefined : json['purpose'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'type': json['type'] == null ? undefined : json['type'], + 'versions': json['versions'] == null ? undefined : ((json['versions'] as Array).map(ControllerApiResourcesScopesV1KeyVersionFromJSON)), + }; +} + +export function ControllerApiResourcesScopesV1KeyToJSON(json: any): ControllerApiResourcesScopesV1Key { + return ControllerApiResourcesScopesV1KeyToJSONTyped(json, false); +} + +export function ControllerApiResourcesScopesV1KeyToJSONTyped(value?: ControllerApiResourcesScopesV1Key | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'purpose': value['purpose'], + 'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()), + 'type': value['type'], + 'versions': value['versions'] == null ? undefined : ((value['versions'] as Array).map(ControllerApiResourcesScopesV1KeyVersionToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesScopesV1KeyVersion.ts b/e2e-tests/api-client/models/ControllerApiResourcesScopesV1KeyVersion.ts new file mode 100644 index 000000000..30f1b2324 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesScopesV1KeyVersion.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesScopesV1KeyVersion + */ +export interface ControllerApiResourcesScopesV1KeyVersion { + /** + * The ID of the key version. + * @type {string} + * @memberof ControllerApiResourcesScopesV1KeyVersion + */ + id?: string; + /** + * The iteration of the Key that this version represents. + * @type {number} + * @memberof ControllerApiResourcesScopesV1KeyVersion + */ + version?: number; + /** + * When this version was created. + * @type {Date} + * @memberof ControllerApiResourcesScopesV1KeyVersion + */ + createdTime?: Date; +} + +/** + * Check if a given object implements the ControllerApiResourcesScopesV1KeyVersion interface. + */ +export function instanceOfControllerApiResourcesScopesV1KeyVersion(value: object): value is ControllerApiResourcesScopesV1KeyVersion { + return true; +} + +export function ControllerApiResourcesScopesV1KeyVersionFromJSON(json: any): ControllerApiResourcesScopesV1KeyVersion { + return ControllerApiResourcesScopesV1KeyVersionFromJSONTyped(json, false); +} + +export function ControllerApiResourcesScopesV1KeyVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesScopesV1KeyVersion { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'version': json['version'] == null ? undefined : json['version'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + }; +} + +export function ControllerApiResourcesScopesV1KeyVersionToJSON(json: any): ControllerApiResourcesScopesV1KeyVersion { + return ControllerApiResourcesScopesV1KeyVersionToJSONTyped(json, false); +} + +export function ControllerApiResourcesScopesV1KeyVersionToJSONTyped(value?: ControllerApiResourcesScopesV1KeyVersion | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'version': value['version'], + 'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesScopesV1KeyVersionDestructionJob.ts b/e2e-tests/api-client/models/ControllerApiResourcesScopesV1KeyVersionDestructionJob.ts new file mode 100644 index 000000000..d2feccd00 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesScopesV1KeyVersionDestructionJob.ts @@ -0,0 +1,114 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * KeyVersionDestructionJob holds information about a pending key version destruction job. + * @export + * @interface ControllerApiResourcesScopesV1KeyVersionDestructionJob + */ +export interface ControllerApiResourcesScopesV1KeyVersionDestructionJob { + /** + * The ID of the Key version this job relates to. + * @type {string} + * @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob + */ + keyVersionId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * The current status of the key version destruction job. One of "pending", "running" or "completed". + * @type {string} + * @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob + */ + status?: string; + /** + * The time this key version destruction job was created. + * @type {Date} + * @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob + */ + createdTime?: Date; + /** + * The number of rows that have been successfully re-encrypted with a new key version. + * All rows must be re-encrypted before the key version can be destroyed. + * @type {string} + * @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob + */ + completedCount?: string; + /** + * The total number of rows that need re-encrypting. + * @type {string} + * @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob + */ + totalCount?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesScopesV1KeyVersionDestructionJob interface. + */ +export function instanceOfControllerApiResourcesScopesV1KeyVersionDestructionJob(value: object): value is ControllerApiResourcesScopesV1KeyVersionDestructionJob { + return true; +} + +export function ControllerApiResourcesScopesV1KeyVersionDestructionJobFromJSON(json: any): ControllerApiResourcesScopesV1KeyVersionDestructionJob { + return ControllerApiResourcesScopesV1KeyVersionDestructionJobFromJSONTyped(json, false); +} + +export function ControllerApiResourcesScopesV1KeyVersionDestructionJobFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesScopesV1KeyVersionDestructionJob { + if (json == null) { + return json; + } + return { + + 'keyVersionId': json['key_version_id'] == null ? undefined : json['key_version_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'status': json['status'] == null ? undefined : json['status'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'completedCount': json['completed_count'] == null ? undefined : json['completed_count'], + 'totalCount': json['total_count'] == null ? undefined : json['total_count'], + }; +} + +export function ControllerApiResourcesScopesV1KeyVersionDestructionJobToJSON(json: any): ControllerApiResourcesScopesV1KeyVersionDestructionJob { + return ControllerApiResourcesScopesV1KeyVersionDestructionJobToJSONTyped(json, false); +} + +export function ControllerApiResourcesScopesV1KeyVersionDestructionJobToJSONTyped(value?: ControllerApiResourcesScopesV1KeyVersionDestructionJob | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'key_version_id': value['keyVersionId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'status': value['status'], + 'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()), + 'completed_count': value['completedCount'], + 'total_count': value['totalCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesScopesV1Scope.ts b/e2e-tests/api-client/models/ControllerApiResourcesScopesV1Scope.ts new file mode 100644 index 000000000..72112c0a1 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesScopesV1Scope.ts @@ -0,0 +1,164 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesScopesV1Scope + */ +export interface ControllerApiResourcesScopesV1Scope { + /** + * The ID of the scope. + * @type {string} + * @memberof ControllerApiResourcesScopesV1Scope + */ + readonly id?: string; + /** + * The ID of the scope this resource is in. If this is the "global" scope this field will be empty. + * @type {string} + * @memberof ControllerApiResourcesScopesV1Scope + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesScopesV1Scope + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesScopesV1Scope + */ + name?: string; + /** + * Optional user-set descripton for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesScopesV1Scope + */ + description?: string; + /** + * The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesScopesV1Scope + */ + readonly createdTime?: Date; + /** + * The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesScopesV1Scope + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesScopesV1Scope + */ + version?: number; + /** + * The type of the resource. + * @type {string} + * @memberof ControllerApiResourcesScopesV1Scope + */ + type?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesScopesV1Scope + */ + primaryAuthMethodId?: string; + /** + * The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesScopesV1Scope + */ + readonly authorizedActions?: Array; + /** + * The authorized actions for the scope's collections. + * @type {{ [key: string]: Array; }} + * @memberof ControllerApiResourcesScopesV1Scope + */ + readonly authorizedCollectionActions?: { [key: string]: Array; }; + /** + * The attached storage policy id. + * @type {string} + * @memberof ControllerApiResourcesScopesV1Scope + */ + readonly storagePolicyId?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesScopesV1Scope interface. + */ +export function instanceOfControllerApiResourcesScopesV1Scope(value: object): value is ControllerApiResourcesScopesV1Scope { + return true; +} + +export function ControllerApiResourcesScopesV1ScopeFromJSON(json: any): ControllerApiResourcesScopesV1Scope { + return ControllerApiResourcesScopesV1ScopeFromJSONTyped(json, false); +} + +export function ControllerApiResourcesScopesV1ScopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesScopesV1Scope { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'primaryAuthMethodId': json['primary_auth_method_id'] == null ? undefined : json['primary_auth_method_id'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + 'authorizedCollectionActions': json['authorized_collection_actions'] == null ? undefined : json['authorized_collection_actions'], + 'storagePolicyId': json['storage_policy_id'] == null ? undefined : json['storage_policy_id'], + }; +} + +export function ControllerApiResourcesScopesV1ScopeToJSON(json: any): ControllerApiResourcesScopesV1Scope { + return ControllerApiResourcesScopesV1ScopeToJSONTyped(json, false); +} + +export function ControllerApiResourcesScopesV1ScopeToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'primary_auth_method_id': value['primaryAuthMethodId'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesScopesV1ScopeInfo.ts b/e2e-tests/api-client/models/ControllerApiResourcesScopesV1ScopeInfo.ts new file mode 100644 index 000000000..a0c40a304 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesScopesV1ScopeInfo.ts @@ -0,0 +1,92 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesScopesV1ScopeInfo + */ +export interface ControllerApiResourcesScopesV1ScopeInfo { + /** + * The ID of the scope. + * @type {string} + * @memberof ControllerApiResourcesScopesV1ScopeInfo + */ + readonly id?: string; + /** + * The type of the scope. + * @type {string} + * @memberof ControllerApiResourcesScopesV1ScopeInfo + */ + readonly type?: string; + /** + * The name of the scope, if any. + * @type {string} + * @memberof ControllerApiResourcesScopesV1ScopeInfo + */ + readonly name?: string; + /** + * The description of the scope, if any. + * @type {string} + * @memberof ControllerApiResourcesScopesV1ScopeInfo + */ + readonly description?: string; + /** + * The ID of the parent scope, if any. This field is empty if it is the "global" scope. + * @type {string} + * @memberof ControllerApiResourcesScopesV1ScopeInfo + */ + readonly parentScopeId?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesScopesV1ScopeInfo interface. + */ +export function instanceOfControllerApiResourcesScopesV1ScopeInfo(value: object): value is ControllerApiResourcesScopesV1ScopeInfo { + return true; +} + +export function ControllerApiResourcesScopesV1ScopeInfoFromJSON(json: any): ControllerApiResourcesScopesV1ScopeInfo { + return ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped(json, false); +} + +export function ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesScopesV1ScopeInfo { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'type': json['type'] == null ? undefined : json['type'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'parentScopeId': json['parent_scope_id'] == null ? undefined : json['parent_scope_id'], + }; +} + +export function ControllerApiResourcesScopesV1ScopeInfoToJSON(json: any): ControllerApiResourcesScopesV1ScopeInfo { + return ControllerApiResourcesScopesV1ScopeInfoToJSONTyped(json, false); +} + +export function ControllerApiResourcesScopesV1ScopeInfoToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ChannelRecording.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ChannelRecording.ts new file mode 100644 index 000000000..df5f1b8f5 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ChannelRecording.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * ChannelRecording contains recorded information about a single Channel within a Connection. + * Channels are only present in multiplexed protocols, such as SSH. + * @export + * @interface ControllerApiResourcesSessionrecordingsV1ChannelRecording + */ +export interface ControllerApiResourcesSessionrecordingsV1ChannelRecording { + /** + * The ID of the Channel recording. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording + */ + id?: string; + /** + * The total number of bytes uploaded from the client in the Channel. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording + */ + bytesUp?: string; + /** + * The total number of bytes downloaded to the client in the Channel. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording + */ + bytesDown?: string; + /** + * The time the Channel was created in the controller. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording + */ + createdTime?: Date; + /** + * The time of the most recent update to the Channel. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording + */ + updatedTime?: Date; + /** + * The time the Channel started. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording + */ + startTime?: Date; + /** + * The time the Channel ended. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording + */ + endTime?: Date; + /** + * The total duration of the Channel. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording + */ + duration?: string; + /** + * MimeTypes define the mime types that can + * be used to consume the recording of this Channel. + * The only supported mime type is "application/x-asciicast". + * @type {Array} + * @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording + */ + mimeTypes?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1ChannelRecording interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1ChannelRecording(value: object): value is ControllerApiResourcesSessionrecordingsV1ChannelRecording { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1ChannelRecording { + return ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1ChannelRecording { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'bytesUp': json['bytes_up'] == null ? undefined : json['bytes_up'], + 'bytesDown': json['bytes_down'] == null ? undefined : json['bytes_down'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'startTime': json['start_time'] == null ? undefined : (new Date(json['start_time'])), + 'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])), + 'duration': json['duration'] == null ? undefined : json['duration'], + 'mimeTypes': json['mime_types'] == null ? undefined : json['mime_types'], + }; +} + +export function ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSON(json: any): ControllerApiResourcesSessionrecordingsV1ChannelRecording { + return ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1ChannelRecording | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'bytes_up': value['bytesUp'], + 'bytes_down': value['bytesDown'], + 'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()), + 'updated_time': value['updatedTime'] == null ? undefined : ((value['updatedTime']).toISOString()), + 'start_time': value['startTime'] == null ? undefined : ((value['startTime']).toISOString()), + 'end_time': value['endTime'] == null ? undefined : ((value['endTime']).toISOString()), + 'duration': value['duration'], + 'mime_types': value['mimeTypes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ConnectionRecording.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ConnectionRecording.ts new file mode 100644 index 000000000..6ce95398c --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ConnectionRecording.ts @@ -0,0 +1,150 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionrecordingsV1ChannelRecording } from './ControllerApiResourcesSessionrecordingsV1ChannelRecording'; +import { + ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSON, + ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSON, + ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1ChannelRecording'; + +/** + * ConnectionRecording contains the recording of a single Connection within a Session. + * @export + * @interface ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ +export interface ControllerApiResourcesSessionrecordingsV1ConnectionRecording { + /** + * The ID of the Connection recording. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ + id?: string; + /** + * The total number of bytes uploaded from the client in the Connection. + * This includes any protocol overhead. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ + bytesUp?: string; + /** + * The total number of bytes downloaded to the client in the Connection. + * This includes any protocol overhead. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ + bytesDown?: string; + /** + * The time the Connection was created in the controller. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ + createdTime?: Date; + /** + * The time of the most recent update to the Connection. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ + updatedTime?: Date; + /** + * The time the Connection started. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ + startTime?: Date; + /** + * The time the Connection ended. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ + endTime?: Date; + /** + * The total duration of the Connection. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ + duration?: string; + /** + * MimeTypes define the mime types that can + * be used to consume the recording of this Connection. + * No mime types are currently supported. + * @type {Array} + * @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ + mimeTypes?: Array; + /** + * Optionally, the channels used in this Connection, + * if it is using a multiplexed protocol, such as SSH. + * @type {Array} + * @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording + */ + channelRecordings?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1ConnectionRecording interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1ConnectionRecording(value: object): value is ControllerApiResourcesSessionrecordingsV1ConnectionRecording { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1ConnectionRecording { + return ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1ConnectionRecording { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'bytesUp': json['bytes_up'] == null ? undefined : json['bytes_up'], + 'bytesDown': json['bytes_down'] == null ? undefined : json['bytes_down'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'startTime': json['start_time'] == null ? undefined : (new Date(json['start_time'])), + 'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])), + 'duration': json['duration'] == null ? undefined : json['duration'], + 'mimeTypes': json['mime_types'] == null ? undefined : json['mime_types'], + 'channelRecordings': json['channel_recordings'] == null ? undefined : ((json['channel_recordings'] as Array).map(ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSON)), + }; +} + +export function ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSON(json: any): ControllerApiResourcesSessionrecordingsV1ConnectionRecording { + return ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1ConnectionRecording | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'bytes_up': value['bytesUp'], + 'bytes_down': value['bytesDown'], + 'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()), + 'updated_time': value['updatedTime'] == null ? undefined : ((value['updatedTime']).toISOString()), + 'start_time': value['startTime'] == null ? undefined : ((value['startTime']).toISOString()), + 'end_time': value['endTime'] == null ? undefined : ((value['endTime']).toISOString()), + 'duration': value['duration'], + 'mime_types': value['mimeTypes'], + 'channel_recordings': value['channelRecordings'] == null ? undefined : ((value['channelRecordings'] as Array).map(ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Credential.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Credential.ts new file mode 100644 index 000000000..37c007ced --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Credential.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionrecordingsV1CredentialStore } from './ControllerApiResourcesSessionrecordingsV1CredentialStore'; +import { + ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSON, + ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSON, + ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1CredentialStore'; + +/** + * + * @export + * @interface ControllerApiResourcesSessionrecordingsV1Credential + */ +export interface ControllerApiResourcesSessionrecordingsV1Credential { + /** + * The ID of the Credential. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Credential + */ + id?: string; + /** + * + * @type {ControllerApiResourcesSessionrecordingsV1CredentialStore} + * @memberof ControllerApiResourcesSessionrecordingsV1Credential + */ + credentialStore?: ControllerApiResourcesSessionrecordingsV1CredentialStore; + /** + * The name of the credential. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Credential + */ + name?: string; + /** + * Optional user-set description. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Credential + */ + description?: string; + /** + * The purposes for which this Credential was attached to the sesssion. + * @type {Array} + * @memberof ControllerApiResourcesSessionrecordingsV1Credential + */ + purposes?: Array; + /** + * The Credential type. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Credential + */ + type?: string; + /** + * The attributes that are applicable for the specific Credential type. + * @type {object} + * @memberof ControllerApiResourcesSessionrecordingsV1Credential + */ + attributes?: object; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1Credential interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1Credential(value: object): value is ControllerApiResourcesSessionrecordingsV1Credential { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1Credential { + return ControllerApiResourcesSessionrecordingsV1CredentialFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1Credential { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'credentialStore': json['credential_store'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSON(json['credential_store']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'purposes': json['purposes'] == null ? undefined : json['purposes'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialToJSON(json: any): ControllerApiResourcesSessionrecordingsV1Credential { + return ControllerApiResourcesSessionrecordingsV1CredentialToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1Credential | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'credential_store': ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSON(value['credentialStore']), + 'name': value['name'], + 'description': value['description'], + 'purposes': value['purposes'], + 'type': value['type'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1CredentialLibrary.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1CredentialLibrary.ts new file mode 100644 index 000000000..2c7085f80 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1CredentialLibrary.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionrecordingsV1CredentialStore } from './ControllerApiResourcesSessionrecordingsV1CredentialStore'; +import { + ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSON, + ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSON, + ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1CredentialStore'; + +/** + * + * @export + * @interface ControllerApiResourcesSessionrecordingsV1CredentialLibrary + */ +export interface ControllerApiResourcesSessionrecordingsV1CredentialLibrary { + /** + * The ID of the Credential Library. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary + */ + id?: string; + /** + * + * @type {ControllerApiResourcesSessionrecordingsV1CredentialStore} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary + */ + credentialStore?: ControllerApiResourcesSessionrecordingsV1CredentialStore; + /** + * Optional name of this Credential Library. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary + */ + name?: string; + /** + * Optional user-set description of this Credential Library. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary + */ + description?: string; + /** + * The purposes for which this CredentialLibrary was attached to the sesssion. + * @type {Array} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary + */ + purposes?: Array; + /** + * The Credential Library type. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary + */ + type?: string; + /** + * The attributes that are applicable for the specific Credential Library type. + * @type {object} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary + */ + attributes?: object; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1CredentialLibrary interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1CredentialLibrary(value: object): value is ControllerApiResourcesSessionrecordingsV1CredentialLibrary { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1CredentialLibrary { + return ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1CredentialLibrary { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'credentialStore': json['credential_store'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSON(json['credential_store']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'purposes': json['purposes'] == null ? undefined : json['purposes'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSON(json: any): ControllerApiResourcesSessionrecordingsV1CredentialLibrary { + return ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1CredentialLibrary | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'credential_store': ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSON(value['credentialStore']), + 'name': value['name'], + 'description': value['description'], + 'purposes': value['purposes'], + 'type': value['type'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1CredentialStore.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1CredentialStore.ts new file mode 100644 index 000000000..49fa1d5a5 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1CredentialStore.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesSessionrecordingsV1CredentialStore + */ +export interface ControllerApiResourcesSessionrecordingsV1CredentialStore { + /** + * The ID of the Credential Store. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore + */ + id?: string; + /** + * The ID of the Scope of which this Credential Store is a part. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore + */ + scopeId?: string; + /** + * The name for identification purposes if set. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore + */ + name?: string; + /** + * The description for identification purposes if set. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore + */ + description?: string; + /** + * The Credential Store type. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore + */ + type?: string; + /** + * The attributes that are applicable for the specific Credential Store type. + * @type {object} + * @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore + */ + attributes?: object; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1CredentialStore interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1CredentialStore(value: object): value is ControllerApiResourcesSessionrecordingsV1CredentialStore { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1CredentialStore { + return ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1CredentialStore { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSON(json: any): ControllerApiResourcesSessionrecordingsV1CredentialStore { + return ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1CredentialStore | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'scope_id': value['scopeId'], + 'name': value['name'], + 'description': value['description'], + 'type': value['type'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Host.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Host.ts new file mode 100644 index 000000000..2c617446d --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Host.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionrecordingsV1HostCatalog } from './ControllerApiResourcesSessionrecordingsV1HostCatalog'; +import { + ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSON, + ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1HostCatalogToJSON, + ControllerApiResourcesSessionrecordingsV1HostCatalogToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1HostCatalog'; + +/** + * Host describes the Host that was chosen for the recorded session. + * @export + * @interface ControllerApiResourcesSessionrecordingsV1Host + */ +export interface ControllerApiResourcesSessionrecordingsV1Host { + /** + * + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Host + */ + id?: string; + /** + * + * @type {ControllerApiResourcesSessionrecordingsV1HostCatalog} + * @memberof ControllerApiResourcesSessionrecordingsV1Host + */ + hostCatalog?: ControllerApiResourcesSessionrecordingsV1HostCatalog; + /** + * The name of the Host, if set. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Host + */ + name?: string; + /** + * The description of the Host, if set. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Host + */ + description?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Host + */ + type?: string; + /** + * The attributes that are applicable for the specific Host. + * @type {object} + * @memberof ControllerApiResourcesSessionrecordingsV1Host + */ + attributes?: object; + /** + * The external id of the Host, if any. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Host + */ + externalId?: string; + /** + * The external name of the Host, if any. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Host + */ + externalName?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1Host interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1Host(value: object): value is ControllerApiResourcesSessionrecordingsV1Host { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1HostFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1Host { + return ControllerApiResourcesSessionrecordingsV1HostFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1HostFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1Host { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'hostCatalog': json['host_catalog'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSON(json['host_catalog']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'externalId': json['external_id'] == null ? undefined : json['external_id'], + 'externalName': json['external_name'] == null ? undefined : json['external_name'], + }; +} + +export function ControllerApiResourcesSessionrecordingsV1HostToJSON(json: any): ControllerApiResourcesSessionrecordingsV1Host { + return ControllerApiResourcesSessionrecordingsV1HostToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1HostToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1Host | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'host_catalog': ControllerApiResourcesSessionrecordingsV1HostCatalogToJSON(value['hostCatalog']), + 'name': value['name'], + 'description': value['description'], + 'type': value['type'], + 'attributes': value['attributes'], + 'external_id': value['externalId'], + 'external_name': value['externalName'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1HostCatalog.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1HostCatalog.ts new file mode 100644 index 000000000..61bf741e6 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1HostCatalog.ts @@ -0,0 +1,122 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * HostCatalog describes the HostCatalog that contains the host chosen for the + * recorded session. + * @export + * @interface ControllerApiResourcesSessionrecordingsV1HostCatalog + */ +export interface ControllerApiResourcesSessionrecordingsV1HostCatalog { + /** + * + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog + */ + id?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * The plugin id used by this Host Catalog, if any. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog + */ + pluginId?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog + */ + name?: string; + /** + * The description of the Host Catalog. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog + */ + description?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog + */ + type?: string; + /** + * The attributes of the Host Catalog. + * @type {object} + * @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog + */ + attributes?: object; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1HostCatalog interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1HostCatalog(value: object): value is ControllerApiResourcesSessionrecordingsV1HostCatalog { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1HostCatalog { + return ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1HostCatalog { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'pluginId': json['plugin_id'] == null ? undefined : json['plugin_id'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function ControllerApiResourcesSessionrecordingsV1HostCatalogToJSON(json: any): ControllerApiResourcesSessionrecordingsV1HostCatalog { + return ControllerApiResourcesSessionrecordingsV1HostCatalogToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1HostCatalogToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1HostCatalog | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'plugin_id': value['pluginId'], + 'name': value['name'], + 'description': value['description'], + 'type': value['type'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1SessionRecording.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1SessionRecording.ts new file mode 100644 index 000000000..b4cc62543 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1SessionRecording.ts @@ -0,0 +1,256 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionrecordingsV1ValuesAtTime } from './ControllerApiResourcesSessionrecordingsV1ValuesAtTime'; +import { + ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSON, + ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSON, + ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1ValuesAtTime'; +import type { ControllerApiResourcesSessionrecordingsV1ConnectionRecording } from './ControllerApiResourcesSessionrecordingsV1ConnectionRecording'; +import { + ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSON, + ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSON, + ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1ConnectionRecording'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * SessionRecording contains information about the recording of a Session. + * @export + * @interface ControllerApiResourcesSessionrecordingsV1SessionRecording + */ +export interface ControllerApiResourcesSessionrecordingsV1SessionRecording { + /** + * The ID of the Session recording. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + id?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * The ID of the Session which this Session Recording recorded. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + sessionId?: string; + /** + * The ID of the Storage Bucket for the Target of this Session Recording. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + storageBucketId?: string; + /** + * The total number of bytes uploaded from the client in the Session. + * This includes all bytes uploaded over all Connections, including + * any protocol overhead. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + bytesUp?: string; + /** + * The total number of bytes downloaded to the client in the Session. + * This includes all bytes downloaded over all Connections, including + * any protocol overhead. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + bytesDown?: string; + /** + * The time the Session Recording was created in the controller. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + createdTime?: Date; + /** + * The time of the most recent update to the Session Recording. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + updatedTime?: Date; + /** + * The time the Session started. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + startTime?: Date; + /** + * The time the Session ended. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + endTime?: Date; + /** + * The total duration of the Session. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + duration?: string; + /** + * Type of the Session that was recorded (e.g. ssh). + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + type?: string; + /** + * The current state of the session recording. One of + * "started", "available" and "unknown". + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + state?: string; + /** + * Any error seen during the closing of the session recording. + * Currently only set if state is "unknown". + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + errorDetails?: string; + /** + * MimeTypes define the mime types that can + * be used to consume the recording of this Session. + * No mime types are currently supported. + * @type {Array} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + mimeTypes?: Array; + /** + * The endpoint of the Session; that is, the address to which the egress worker connected. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + endpoint?: string; + /** + * The recordings of the connections that were created in the Session. + * This field may be unset when listing Session recordings. + * @type {Array} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + connectionRecordings?: Array; + /** + * + * @type {ControllerApiResourcesSessionrecordingsV1ValuesAtTime} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + createTimeValues?: ControllerApiResourcesSessionrecordingsV1ValuesAtTime; + /** + * The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + authorizedActions?: Array; + /** + * The time until a session recording is required to be stored. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + retainUntil?: Date; + /** + * The time a session recording is scheduled to be automatically deleted. + * @type {Date} + * @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording + */ + deleteAfter?: Date; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1SessionRecording interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1SessionRecording(value: object): value is ControllerApiResourcesSessionrecordingsV1SessionRecording { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1SessionRecording { + return ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1SessionRecording { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'sessionId': json['session_id'] == null ? undefined : json['session_id'], + 'storageBucketId': json['storage_bucket_id'] == null ? undefined : json['storage_bucket_id'], + 'bytesUp': json['bytes_up'] == null ? undefined : json['bytes_up'], + 'bytesDown': json['bytes_down'] == null ? undefined : json['bytes_down'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'startTime': json['start_time'] == null ? undefined : (new Date(json['start_time'])), + 'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])), + 'duration': json['duration'] == null ? undefined : json['duration'], + 'type': json['type'] == null ? undefined : json['type'], + 'state': json['state'] == null ? undefined : json['state'], + 'errorDetails': json['error_details'] == null ? undefined : json['error_details'], + 'mimeTypes': json['mime_types'] == null ? undefined : json['mime_types'], + 'endpoint': json['endpoint'] == null ? undefined : json['endpoint'], + 'connectionRecordings': json['connection_recordings'] == null ? undefined : ((json['connection_recordings'] as Array).map(ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSON)), + 'createTimeValues': json['create_time_values'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSON(json['create_time_values']), + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + 'retainUntil': json['retain_until'] == null ? undefined : (new Date(json['retain_until'])), + 'deleteAfter': json['delete_after'] == null ? undefined : (new Date(json['delete_after'])), + }; +} + +export function ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSON(json: any): ControllerApiResourcesSessionrecordingsV1SessionRecording { + return ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1SessionRecording | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'session_id': value['sessionId'], + 'storage_bucket_id': value['storageBucketId'], + 'bytes_up': value['bytesUp'], + 'bytes_down': value['bytesDown'], + 'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()), + 'updated_time': value['updatedTime'] == null ? undefined : ((value['updatedTime']).toISOString()), + 'start_time': value['startTime'] == null ? undefined : ((value['startTime']).toISOString()), + 'end_time': value['endTime'] == null ? undefined : ((value['endTime']).toISOString()), + 'duration': value['duration'], + 'type': value['type'], + 'state': value['state'], + 'error_details': value['errorDetails'], + 'mime_types': value['mimeTypes'], + 'endpoint': value['endpoint'], + 'connection_recordings': value['connectionRecordings'] == null ? undefined : ((value['connectionRecordings'] as Array).map(ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSON)), + 'create_time_values': ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSON(value['createTimeValues']), + 'authorized_actions': value['authorizedActions'], + 'retain_until': value['retainUntil'] == null ? undefined : ((value['retainUntil']).toISOString()), + 'delete_after': value['deleteAfter'] == null ? undefined : ((value['deleteAfter']).toISOString()), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Target.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Target.ts new file mode 100644 index 000000000..6817796e6 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1Target.ts @@ -0,0 +1,153 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * Target describes a target in Boundary. + * @export + * @interface ControllerApiResourcesSessionrecordingsV1Target + */ +export interface ControllerApiResourcesSessionrecordingsV1Target { + /** + * The ID of the Target. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + id?: string; + /** + * The name of the Target, if set. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + name?: string; + /** + * The description of the Target, if set. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + description?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Maximum total lifetime of a created Session, in seconds. + * @type {number} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + sessionMaxSeconds?: number; + /** + * Maximum number of connections allowed in a Session. Unlimited is indicated by the value -1. + * @type {number} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + sessionConnectionLimit?: number; + /** + * Optional boolean expression to filter the workers that are allowed to satisfy this request. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + workerFilter?: string; + /** + * Optional boolean expressions to filter the egress workers that are allowed to satisfy this request. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + egressWorkerFilter?: string; + /** + * Optional boolean expressions to filter the ingress workers that are allowed to satisfy this request. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + ingressWorkerFilter?: string; + /** + * The type of the Target. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + type?: string; + /** + * The attributes that are applicable for the specific Target. + * @type {object} + * @memberof ControllerApiResourcesSessionrecordingsV1Target + */ + attributes?: object; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1Target interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1Target(value: object): value is ControllerApiResourcesSessionrecordingsV1Target { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1TargetFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1Target { + return ControllerApiResourcesSessionrecordingsV1TargetFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1TargetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1Target { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'sessionMaxSeconds': json['session_max_seconds'] == null ? undefined : json['session_max_seconds'], + 'sessionConnectionLimit': json['session_connection_limit'] == null ? undefined : json['session_connection_limit'], + 'workerFilter': json['worker_filter'] == null ? undefined : json['worker_filter'], + 'egressWorkerFilter': json['egress_worker_filter'] == null ? undefined : json['egress_worker_filter'], + 'ingressWorkerFilter': json['ingress_worker_filter'] == null ? undefined : json['ingress_worker_filter'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function ControllerApiResourcesSessionrecordingsV1TargetToJSON(json: any): ControllerApiResourcesSessionrecordingsV1Target { + return ControllerApiResourcesSessionrecordingsV1TargetToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1TargetToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1Target | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'description': value['description'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'session_max_seconds': value['sessionMaxSeconds'], + 'session_connection_limit': value['sessionConnectionLimit'], + 'worker_filter': value['workerFilter'], + 'egress_worker_filter': value['egressWorkerFilter'], + 'ingress_worker_filter': value['ingressWorkerFilter'], + 'type': value['type'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1User.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1User.ts new file mode 100644 index 000000000..f5838dbd9 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1User.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * User describes an authenticated user in Boundary. + * @export + * @interface ControllerApiResourcesSessionrecordingsV1User + */ +export interface ControllerApiResourcesSessionrecordingsV1User { + /** + * The ID of the User. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1User + */ + id?: string; + /** + * The name of the User that created the Session. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1User + */ + name?: string; + /** + * The description of the User that created the Session. + * @type {string} + * @memberof ControllerApiResourcesSessionrecordingsV1User + */ + description?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesSessionrecordingsV1User + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1User interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1User(value: object): value is ControllerApiResourcesSessionrecordingsV1User { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1UserFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1User { + return ControllerApiResourcesSessionrecordingsV1UserFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1User { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + }; +} + +export function ControllerApiResourcesSessionrecordingsV1UserToJSON(json: any): ControllerApiResourcesSessionrecordingsV1User { + return ControllerApiResourcesSessionrecordingsV1UserToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1UserToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1User | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'name': value['name'], + 'description': value['description'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ValuesAtTime.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ValuesAtTime.ts new file mode 100644 index 000000000..3f88e7f61 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionrecordingsV1ValuesAtTime.ts @@ -0,0 +1,134 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionrecordingsV1Host } from './ControllerApiResourcesSessionrecordingsV1Host'; +import { + ControllerApiResourcesSessionrecordingsV1HostFromJSON, + ControllerApiResourcesSessionrecordingsV1HostFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1HostToJSON, + ControllerApiResourcesSessionrecordingsV1HostToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1Host'; +import type { ControllerApiResourcesSessionrecordingsV1Credential } from './ControllerApiResourcesSessionrecordingsV1Credential'; +import { + ControllerApiResourcesSessionrecordingsV1CredentialFromJSON, + ControllerApiResourcesSessionrecordingsV1CredentialFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1CredentialToJSON, + ControllerApiResourcesSessionrecordingsV1CredentialToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1Credential'; +import type { ControllerApiResourcesSessionrecordingsV1CredentialLibrary } from './ControllerApiResourcesSessionrecordingsV1CredentialLibrary'; +import { + ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSON, + ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSON, + ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1CredentialLibrary'; +import type { ControllerApiResourcesSessionrecordingsV1Target } from './ControllerApiResourcesSessionrecordingsV1Target'; +import { + ControllerApiResourcesSessionrecordingsV1TargetFromJSON, + ControllerApiResourcesSessionrecordingsV1TargetFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1TargetToJSON, + ControllerApiResourcesSessionrecordingsV1TargetToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1Target'; +import type { ControllerApiResourcesSessionrecordingsV1User } from './ControllerApiResourcesSessionrecordingsV1User'; +import { + ControllerApiResourcesSessionrecordingsV1UserFromJSON, + ControllerApiResourcesSessionrecordingsV1UserFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1UserToJSON, + ControllerApiResourcesSessionrecordingsV1UserToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1User'; + +/** + * ValuesAtTime contain information about other Boundary resources as they + * were at a certain time through the lifetime of the Session Recording. + * @export + * @interface ControllerApiResourcesSessionrecordingsV1ValuesAtTime + */ +export interface ControllerApiResourcesSessionrecordingsV1ValuesAtTime { + /** + * + * @type {ControllerApiResourcesSessionrecordingsV1User} + * @memberof ControllerApiResourcesSessionrecordingsV1ValuesAtTime + */ + user?: ControllerApiResourcesSessionrecordingsV1User; + /** + * + * @type {ControllerApiResourcesSessionrecordingsV1Target} + * @memberof ControllerApiResourcesSessionrecordingsV1ValuesAtTime + */ + target?: ControllerApiResourcesSessionrecordingsV1Target; + /** + * + * @type {ControllerApiResourcesSessionrecordingsV1Host} + * @memberof ControllerApiResourcesSessionrecordingsV1ValuesAtTime + */ + host?: ControllerApiResourcesSessionrecordingsV1Host; + /** + * Information about the Credentials used for this session. + * @type {Array} + * @memberof ControllerApiResourcesSessionrecordingsV1ValuesAtTime + */ + credentials?: Array; + /** + * Information about the Credential Libraries used for this session. + * @type {Array} + * @memberof ControllerApiResourcesSessionrecordingsV1ValuesAtTime + */ + credentialLibraries?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionrecordingsV1ValuesAtTime interface. + */ +export function instanceOfControllerApiResourcesSessionrecordingsV1ValuesAtTime(value: object): value is ControllerApiResourcesSessionrecordingsV1ValuesAtTime { + return true; +} + +export function ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1ValuesAtTime { + return ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1ValuesAtTime { + if (json == null) { + return json; + } + return { + + 'user': json['user'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1UserFromJSON(json['user']), + 'target': json['target'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1TargetFromJSON(json['target']), + 'host': json['host'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1HostFromJSON(json['host']), + 'credentials': json['credentials'] == null ? undefined : ((json['credentials'] as Array).map(ControllerApiResourcesSessionrecordingsV1CredentialFromJSON)), + 'credentialLibraries': json['credential_libraries'] == null ? undefined : ((json['credential_libraries'] as Array).map(ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSON)), + }; +} + +export function ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSON(json: any): ControllerApiResourcesSessionrecordingsV1ValuesAtTime { + return ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1ValuesAtTime | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'user': ControllerApiResourcesSessionrecordingsV1UserToJSON(value['user']), + 'target': ControllerApiResourcesSessionrecordingsV1TargetToJSON(value['target']), + 'host': ControllerApiResourcesSessionrecordingsV1HostToJSON(value['host']), + 'credentials': value['credentials'] == null ? undefined : ((value['credentials'] as Array).map(ControllerApiResourcesSessionrecordingsV1CredentialToJSON)), + 'credential_libraries': value['credentialLibraries'] == null ? undefined : ((value['credentialLibraries'] as Array).map(ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionsV1Connection.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionsV1Connection.ts new file mode 100644 index 000000000..e83efc6d2 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionsV1Connection.ts @@ -0,0 +1,113 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesSessionsV1Connection + */ +export interface ControllerApiResourcesSessionsV1Connection { + /** + * + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Connection + */ + clientTcpAddress?: string; + /** + * + * @type {number} + * @memberof ControllerApiResourcesSessionsV1Connection + */ + clientTcpPort?: number; + /** + * + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Connection + */ + endpointTcpAddress?: string; + /** + * + * @type {number} + * @memberof ControllerApiResourcesSessionsV1Connection + */ + endpointTcpPort?: number; + /** + * + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Connection + */ + bytesUp?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Connection + */ + bytesDown?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Connection + */ + closedReason?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionsV1Connection interface. + */ +export function instanceOfControllerApiResourcesSessionsV1Connection(value: object): value is ControllerApiResourcesSessionsV1Connection { + return true; +} + +export function ControllerApiResourcesSessionsV1ConnectionFromJSON(json: any): ControllerApiResourcesSessionsV1Connection { + return ControllerApiResourcesSessionsV1ConnectionFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionsV1ConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionsV1Connection { + if (json == null) { + return json; + } + return { + + 'clientTcpAddress': json['client_tcp_address'] == null ? undefined : json['client_tcp_address'], + 'clientTcpPort': json['client_tcp_port'] == null ? undefined : json['client_tcp_port'], + 'endpointTcpAddress': json['endpoint_tcp_address'] == null ? undefined : json['endpoint_tcp_address'], + 'endpointTcpPort': json['endpoint_tcp_port'] == null ? undefined : json['endpoint_tcp_port'], + 'bytesUp': json['bytes_up'] == null ? undefined : json['bytes_up'], + 'bytesDown': json['bytes_down'] == null ? undefined : json['bytes_down'], + 'closedReason': json['closed_reason'] == null ? undefined : json['closed_reason'], + }; +} + +export function ControllerApiResourcesSessionsV1ConnectionToJSON(json: any): ControllerApiResourcesSessionsV1Connection { + return ControllerApiResourcesSessionsV1ConnectionToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionsV1ConnectionToJSONTyped(value?: ControllerApiResourcesSessionsV1Connection | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'client_tcp_address': value['clientTcpAddress'], + 'client_tcp_port': value['clientTcpPort'], + 'endpoint_tcp_address': value['endpointTcpAddress'], + 'endpoint_tcp_port': value['endpointTcpPort'], + 'bytes_up': value['bytesUp'], + 'bytes_down': value['bytesDown'], + 'closed_reason': value['closedReason'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionsV1Session.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionsV1Session.ts new file mode 100644 index 000000000..e18b678c9 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionsV1Session.ts @@ -0,0 +1,221 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionsV1Connection } from './ControllerApiResourcesSessionsV1Connection'; +import { + ControllerApiResourcesSessionsV1ConnectionFromJSON, + ControllerApiResourcesSessionsV1ConnectionFromJSONTyped, + ControllerApiResourcesSessionsV1ConnectionToJSON, + ControllerApiResourcesSessionsV1ConnectionToJSONTyped, +} from './ControllerApiResourcesSessionsV1Connection'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; +import type { ControllerApiResourcesSessionsV1SessionState } from './ControllerApiResourcesSessionsV1SessionState'; +import { + ControllerApiResourcesSessionsV1SessionStateFromJSON, + ControllerApiResourcesSessionsV1SessionStateFromJSONTyped, + ControllerApiResourcesSessionsV1SessionStateToJSON, + ControllerApiResourcesSessionsV1SessionStateToJSONTyped, +} from './ControllerApiResourcesSessionsV1SessionState'; + +/** + * + * @export + * @interface ControllerApiResourcesSessionsV1Session + */ +export interface ControllerApiResourcesSessionsV1Session { + /** + * Output only. The ID of the Session. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly id?: string; + /** + * Output only. The ID of the Target that created this Session. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly targetId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesSessionsV1Session + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly updatedTime?: Date; + /** + * Version is used when canceling this Session to ensure that the operation is acting on a known session state. + * @type {number} + * @memberof ControllerApiResourcesSessionsV1Session + */ + version?: number; + /** + * Output only. Type of the Session (e.g. tcp). + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly type?: string; + /** + * Output only. After this time the connection will be expired, e.g. forcefully terminated. + * @type {Date} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly expirationTime?: Date; + /** + * Output only. The ID of the Auth Token used to authenticate. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly authTokenId?: string; + /** + * Output only. The ID of the User that requested the Session. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly userId?: string; + /** + * Output only. The Host Set sourcing the Host for this Session. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly hostSetId?: string; + /** + * Output only. The Host used by the Session. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly hostId?: string; + /** + * Output only. The Scope of the Session. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly scopeId?: string; + /** + * Output only. The endpoint of the Session; that is, the address to which the worker is proxying data. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly endpoint?: string; + /** + * Output only. The states of this Session in descending order from the current state to the first. + * @type {Array} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly states?: Array; + /** + * Output only. The current status of this Session. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly status?: string; + /** + * Output only. The certificate generated for the session. Raw DER bytes. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly certificate?: string; + /** + * Output only. If the session is terminated, this provides a short description as to why. + * @type {string} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly terminationReason?: string; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly authorizedActions?: Array; + /** + * Output only. The associated connections with this session. + * @type {Array} + * @memberof ControllerApiResourcesSessionsV1Session + */ + readonly connections?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionsV1Session interface. + */ +export function instanceOfControllerApiResourcesSessionsV1Session(value: object): value is ControllerApiResourcesSessionsV1Session { + return true; +} + +export function ControllerApiResourcesSessionsV1SessionFromJSON(json: any): ControllerApiResourcesSessionsV1Session { + return ControllerApiResourcesSessionsV1SessionFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionsV1SessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionsV1Session { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'targetId': json['target_id'] == null ? undefined : json['target_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'expirationTime': json['expiration_time'] == null ? undefined : (new Date(json['expiration_time'])), + 'authTokenId': json['auth_token_id'] == null ? undefined : json['auth_token_id'], + 'userId': json['user_id'] == null ? undefined : json['user_id'], + 'hostSetId': json['host_set_id'] == null ? undefined : json['host_set_id'], + 'hostId': json['host_id'] == null ? undefined : json['host_id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'endpoint': json['endpoint'] == null ? undefined : json['endpoint'], + 'states': json['states'] == null ? undefined : ((json['states'] as Array).map(ControllerApiResourcesSessionsV1SessionStateFromJSON)), + 'status': json['status'] == null ? undefined : json['status'], + 'certificate': json['certificate'] == null ? undefined : json['certificate'], + 'terminationReason': json['termination_reason'] == null ? undefined : json['termination_reason'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + 'connections': json['connections'] == null ? undefined : ((json['connections'] as Array).map(ControllerApiResourcesSessionsV1ConnectionFromJSON)), + }; +} + +export function ControllerApiResourcesSessionsV1SessionToJSON(json: any): ControllerApiResourcesSessionsV1Session { + return ControllerApiResourcesSessionsV1SessionToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionsV1SessionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'version': value['version'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesSessionsV1SessionState.ts b/e2e-tests/api-client/models/ControllerApiResourcesSessionsV1SessionState.ts new file mode 100644 index 000000000..06bdf38e5 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesSessionsV1SessionState.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesSessionsV1SessionState + */ +export interface ControllerApiResourcesSessionsV1SessionState { + /** + * The status of the Session, e.g. "pending", "active", "canceling", "terminated". + * @type {string} + * @memberof ControllerApiResourcesSessionsV1SessionState + */ + status?: string; + /** + * Output only. The time the Session entered this state. + * @type {Date} + * @memberof ControllerApiResourcesSessionsV1SessionState + */ + readonly startTime?: Date; + /** + * Output only. The time the Session stopped being in this state. + * @type {Date} + * @memberof ControllerApiResourcesSessionsV1SessionState + */ + readonly endTime?: Date; +} + +/** + * Check if a given object implements the ControllerApiResourcesSessionsV1SessionState interface. + */ +export function instanceOfControllerApiResourcesSessionsV1SessionState(value: object): value is ControllerApiResourcesSessionsV1SessionState { + return true; +} + +export function ControllerApiResourcesSessionsV1SessionStateFromJSON(json: any): ControllerApiResourcesSessionsV1SessionState { + return ControllerApiResourcesSessionsV1SessionStateFromJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionsV1SessionStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionsV1SessionState { + if (json == null) { + return json; + } + return { + + 'status': json['status'] == null ? undefined : json['status'], + 'startTime': json['start_time'] == null ? undefined : (new Date(json['start_time'])), + 'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])), + }; +} + +export function ControllerApiResourcesSessionsV1SessionStateToJSON(json: any): ControllerApiResourcesSessionsV1SessionState { + return ControllerApiResourcesSessionsV1SessionStateToJSONTyped(json, false); +} + +export function ControllerApiResourcesSessionsV1SessionStateToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'status': value['status'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesStoragebucketsV1StorageBucket.ts b/e2e-tests/api-client/models/ControllerApiResourcesStoragebucketsV1StorageBucket.ts new file mode 100644 index 000000000..102d4a68b --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesStoragebucketsV1StorageBucket.ts @@ -0,0 +1,220 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesPluginsV1PluginInfo } from './ControllerApiResourcesPluginsV1PluginInfo'; +import { + ControllerApiResourcesPluginsV1PluginInfoFromJSON, + ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped, + ControllerApiResourcesPluginsV1PluginInfoToJSON, + ControllerApiResourcesPluginsV1PluginInfoToJSONTyped, +} from './ControllerApiResourcesPluginsV1PluginInfo'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesStoragebucketsV1StorageBucket + */ +export interface ControllerApiResourcesStoragebucketsV1StorageBucket { + /** + * Output only. The ID of the storage bucket. + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + readonly id?: string; + /** + * The ID of the Scope of which this storage bucket is a part. + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * The ID of the plugin of which this storage bucket is created. + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + pluginId?: string; + /** + * + * @type {ControllerApiResourcesPluginsV1PluginInfo} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + plugin?: ControllerApiResourcesPluginsV1PluginInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + description?: string; + /** + * The name of the bucket within the external object store service. + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + bucketName?: string; + /** + * The prefix used to organize the data held within the external object store. + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + bucketPrefix?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + version?: number; + /** + * The type of Storage Bucket (currently only plugin). + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + type?: string; + /** + * Attributes specific to the catalog type. + * @type {object} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + attributes?: object; + /** + * Secrets specific to the storage bucket type. These are never output. + * @type {object} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + secrets?: object; + /** + * Output only. The HMAC of the last secrets supplied via the API, if any. + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + readonly secretsHmac?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + workerFilter?: string; + /** + * Internal use only. The storage bucket credential id for this storage bucket. + * @type {string} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + storageBucketCredentialId?: string; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesStoragebucketsV1StorageBucket + */ + readonly authorizedActions?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesStoragebucketsV1StorageBucket interface. + */ +export function instanceOfControllerApiResourcesStoragebucketsV1StorageBucket(value: object): value is ControllerApiResourcesStoragebucketsV1StorageBucket { + return true; +} + +export function ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(json: any): ControllerApiResourcesStoragebucketsV1StorageBucket { + return ControllerApiResourcesStoragebucketsV1StorageBucketFromJSONTyped(json, false); +} + +export function ControllerApiResourcesStoragebucketsV1StorageBucketFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesStoragebucketsV1StorageBucket { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'pluginId': json['plugin_id'] == null ? undefined : json['plugin_id'], + 'plugin': json['plugin'] == null ? undefined : ControllerApiResourcesPluginsV1PluginInfoFromJSON(json['plugin']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'bucketName': json['bucket_name'] == null ? undefined : json['bucket_name'], + 'bucketPrefix': json['bucket_prefix'] == null ? undefined : json['bucket_prefix'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'secrets': json['secrets'] == null ? undefined : json['secrets'], + 'secretsHmac': json['secrets_hmac'] == null ? undefined : json['secrets_hmac'], + 'workerFilter': json['worker_filter'] == null ? undefined : json['worker_filter'], + 'storageBucketCredentialId': json['storage_bucket_credential_id'] == null ? undefined : json['storage_bucket_credential_id'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + }; +} + +export function ControllerApiResourcesStoragebucketsV1StorageBucketToJSON(json: any): ControllerApiResourcesStoragebucketsV1StorageBucket { + return ControllerApiResourcesStoragebucketsV1StorageBucketToJSONTyped(json, false); +} + +export function ControllerApiResourcesStoragebucketsV1StorageBucketToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'plugin_id': value['pluginId'], + 'plugin': ControllerApiResourcesPluginsV1PluginInfoToJSON(value['plugin']), + 'name': value['name'], + 'description': value['description'], + 'bucket_name': value['bucketName'], + 'bucket_prefix': value['bucketPrefix'], + 'version': value['version'], + 'type': value['type'], + 'attributes': value['attributes'], + 'secrets': value['secrets'], + 'worker_filter': value['workerFilter'], + 'storage_bucket_credential_id': value['storageBucketCredentialId'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1Alias.ts b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1Alias.ts new file mode 100644 index 000000000..e5824296a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1Alias.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1TargetAliasAttributes } from './ControllerApiResourcesTargetsV1TargetAliasAttributes'; +import { + ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSON, + ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSONTyped, + ControllerApiResourcesTargetsV1TargetAliasAttributesToJSON, + ControllerApiResourcesTargetsV1TargetAliasAttributesToJSONTyped, +} from './ControllerApiResourcesTargetsV1TargetAliasAttributes'; + +/** + * Alias is the alias information related to the aliases associated with the target. + * @export + * @interface ControllerApiResourcesTargetsV1Alias + */ +export interface ControllerApiResourcesTargetsV1Alias { + /** + * Output only. The ID of the alias referencing this target. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Alias + */ + readonly id?: string; + /** + * Ouput only. The value of the alias referencing this target. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Alias + */ + value?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Alias + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesTargetsV1TargetAliasAttributes} + * @memberof ControllerApiResourcesTargetsV1Alias + */ + attributes?: ControllerApiResourcesTargetsV1TargetAliasAttributes; +} + +/** + * Check if a given object implements the ControllerApiResourcesTargetsV1Alias interface. + */ +export function instanceOfControllerApiResourcesTargetsV1Alias(value: object): value is ControllerApiResourcesTargetsV1Alias { + return true; +} + +export function ControllerApiResourcesTargetsV1AliasFromJSON(json: any): ControllerApiResourcesTargetsV1Alias { + return ControllerApiResourcesTargetsV1AliasFromJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1AliasFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1Alias { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'value': json['value'] == null ? undefined : json['value'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'attributes': json['attributes'] == null ? undefined : ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSON(json['attributes']), + }; +} + +export function ControllerApiResourcesTargetsV1AliasToJSON(json: any): ControllerApiResourcesTargetsV1Alias { + return ControllerApiResourcesTargetsV1AliasToJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1AliasToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'value': value['value'], + 'scope_id': value['scopeId'], + 'attributes': ControllerApiResourcesTargetsV1TargetAliasAttributesToJSON(value['attributes']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1AuthorizeSessionArguments.ts b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1AuthorizeSessionArguments.ts new file mode 100644 index 000000000..fa929a220 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1AuthorizeSessionArguments.ts @@ -0,0 +1,70 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesTargetsV1AuthorizeSessionArguments + */ +export interface ControllerApiResourcesTargetsV1AuthorizeSessionArguments { + /** + * host_id is the id of the host that the session will be authorized for. + * When specified authorizing a session using this alias will have the same + * effect of authorizing a session to the alias' destination_id and passing + * in this value through the -host-id flag. If the host-id flag is also + * specified when calling authorize-session an error will be returned unless + * the provided host-id matches this value. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1AuthorizeSessionArguments + */ + hostId?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesTargetsV1AuthorizeSessionArguments interface. + */ +export function instanceOfControllerApiResourcesTargetsV1AuthorizeSessionArguments(value: object): value is ControllerApiResourcesTargetsV1AuthorizeSessionArguments { + return true; +} + +export function ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSON(json: any): ControllerApiResourcesTargetsV1AuthorizeSessionArguments { + return ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1AuthorizeSessionArguments { + if (json == null) { + return json; + } + return { + + 'hostId': json['host_id'] == null ? undefined : json['host_id'], + }; +} + +export function ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSON(json: any): ControllerApiResourcesTargetsV1AuthorizeSessionArguments { + return ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSONTyped(value?: ControllerApiResourcesTargetsV1AuthorizeSessionArguments | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'host_id': value['hostId'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1CredentialSource.ts b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1CredentialSource.ts new file mode 100644 index 000000000..b00bafd9f --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1CredentialSource.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesTargetsV1CredentialSource + */ +export interface ControllerApiResourcesTargetsV1CredentialSource { + /** + * The ID of the Credential. May be empty if the credential is dynamically generated from a library. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1CredentialSource + */ + id?: string; + /** + * Output only. The name of the Credential source. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1CredentialSource + */ + readonly name?: string; + /** + * Output only. The description of the Credential source. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1CredentialSource + */ + readonly description?: string; + /** + * Output only. The Credential Store to which this Credential source belongs. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1CredentialSource + */ + readonly credentialStoreId?: string; + /** + * Output only. The type of the credential source (e.g. "vault"; not the type of the credential itself). + * @type {string} + * @memberof ControllerApiResourcesTargetsV1CredentialSource + */ + readonly type?: string; + /** + * Output only. The type of the credential, empty if unspecified. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1CredentialSource + */ + readonly credentialType?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesTargetsV1CredentialSource interface. + */ +export function instanceOfControllerApiResourcesTargetsV1CredentialSource(value: object): value is ControllerApiResourcesTargetsV1CredentialSource { + return true; +} + +export function ControllerApiResourcesTargetsV1CredentialSourceFromJSON(json: any): ControllerApiResourcesTargetsV1CredentialSource { + return ControllerApiResourcesTargetsV1CredentialSourceFromJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1CredentialSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1CredentialSource { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'credentialStoreId': json['credential_store_id'] == null ? undefined : json['credential_store_id'], + 'type': json['type'] == null ? undefined : json['type'], + 'credentialType': json['credential_type'] == null ? undefined : json['credential_type'], + }; +} + +export function ControllerApiResourcesTargetsV1CredentialSourceToJSON(json: any): ControllerApiResourcesTargetsV1CredentialSource { + return ControllerApiResourcesTargetsV1CredentialSourceToJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1CredentialSourceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1HostSource.ts b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1HostSource.ts new file mode 100644 index 000000000..50eb0d7fe --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1HostSource.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesTargetsV1HostSource + */ +export interface ControllerApiResourcesTargetsV1HostSource { + /** + * Output only. The ID of the Host Set. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1HostSource + */ + readonly id?: string; + /** + * Output only. The Host Catalog to which this Host Source belongs. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1HostSource + */ + readonly hostCatalogId?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesTargetsV1HostSource interface. + */ +export function instanceOfControllerApiResourcesTargetsV1HostSource(value: object): value is ControllerApiResourcesTargetsV1HostSource { + return true; +} + +export function ControllerApiResourcesTargetsV1HostSourceFromJSON(json: any): ControllerApiResourcesTargetsV1HostSource { + return ControllerApiResourcesTargetsV1HostSourceFromJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1HostSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1HostSource { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'hostCatalogId': json['host_catalog_id'] == null ? undefined : json['host_catalog_id'], + }; +} + +export function ControllerApiResourcesTargetsV1HostSourceToJSON(json: any): ControllerApiResourcesTargetsV1HostSource { + return ControllerApiResourcesTargetsV1HostSourceToJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1HostSourceToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionAuthorization.ts b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionAuthorization.ts new file mode 100644 index 000000000..ca44443dc --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionAuthorization.ts @@ -0,0 +1,179 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1SessionCredential } from './ControllerApiResourcesTargetsV1SessionCredential'; +import { + ControllerApiResourcesTargetsV1SessionCredentialFromJSON, + ControllerApiResourcesTargetsV1SessionCredentialFromJSONTyped, + ControllerApiResourcesTargetsV1SessionCredentialToJSON, + ControllerApiResourcesTargetsV1SessionCredentialToJSONTyped, +} from './ControllerApiResourcesTargetsV1SessionCredential'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * SessionAuthorization contains all fields related to authorization for a Session. It's in the Targets package because it's returned by a Target's authorize action. + * @export + * @interface ControllerApiResourcesTargetsV1SessionAuthorization + */ +export interface ControllerApiResourcesTargetsV1SessionAuthorization { + /** + * Output only. The ID of the Session. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly sessionId?: string; + /** + * Output only. The ID of the Target authorizing this Session. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly targetId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly createdTime?: Date; + /** + * Output only. The User for which this Session was authorized. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly userId?: string; + /** + * Output only. The Host Set containing the Host being used for this Session. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly hostSetId?: string; + /** + * Output only. The Host whose address is being used as the endpoint for this Session. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly hostId?: string; + /** + * Output only. Type of the Session (e.g. tcp, ssh, etc.). + * @type {string} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly type?: string; + /** + * Output only. The marshaled SessionAuthorizationData message containing all information that the proxy needs. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly authorizationToken?: string; + /** + * Output only. The connection limit being applied to this session. -1 means unlimited. This is not actually enforced on the client side but it provides for better listener handling by including it. + * @type {number} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly connectionLimit?: number; + /** + * Output only. The endpoint address that the worker will connect to, useful for setting TLS parameters. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly endpoint?: string; + /** + * Output only. The endpoint port that will be connected to, either from a + * port directly on the target or from a service definition. + * @type {number} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly endpointPort?: number; + /** + * Output only. The expiration time of the session. + * @type {Date} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly expiration?: Date; + /** + * Output only. The credentials for this session. + * @type {Array} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly credentials?: Array; + /** + * Output only. The ID of the Session Recording. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1SessionAuthorization + */ + readonly sessionRecordingId?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesTargetsV1SessionAuthorization interface. + */ +export function instanceOfControllerApiResourcesTargetsV1SessionAuthorization(value: object): value is ControllerApiResourcesTargetsV1SessionAuthorization { + return true; +} + +export function ControllerApiResourcesTargetsV1SessionAuthorizationFromJSON(json: any): ControllerApiResourcesTargetsV1SessionAuthorization { + return ControllerApiResourcesTargetsV1SessionAuthorizationFromJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1SessionAuthorizationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1SessionAuthorization { + if (json == null) { + return json; + } + return { + + 'sessionId': json['session_id'] == null ? undefined : json['session_id'], + 'targetId': json['target_id'] == null ? undefined : json['target_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'userId': json['user_id'] == null ? undefined : json['user_id'], + 'hostSetId': json['host_set_id'] == null ? undefined : json['host_set_id'], + 'hostId': json['host_id'] == null ? undefined : json['host_id'], + 'type': json['type'] == null ? undefined : json['type'], + 'authorizationToken': json['authorization_token'] == null ? undefined : json['authorization_token'], + 'connectionLimit': json['connection_limit'] == null ? undefined : json['connection_limit'], + 'endpoint': json['endpoint'] == null ? undefined : json['endpoint'], + 'endpointPort': json['endpoint_port'] == null ? undefined : json['endpoint_port'], + 'expiration': json['expiration'] == null ? undefined : (new Date(json['expiration'])), + 'credentials': json['credentials'] == null ? undefined : ((json['credentials'] as Array).map(ControllerApiResourcesTargetsV1SessionCredentialFromJSON)), + 'sessionRecordingId': json['session_recording_id'] == null ? undefined : json['session_recording_id'], + }; +} + +export function ControllerApiResourcesTargetsV1SessionAuthorizationToJSON(json: any): ControllerApiResourcesTargetsV1SessionAuthorization { + return ControllerApiResourcesTargetsV1SessionAuthorizationToJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1SessionAuthorizationToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionCredential.ts b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionCredential.ts new file mode 100644 index 000000000..5ff32282a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionCredential.ts @@ -0,0 +1,96 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1CredentialSource } from './ControllerApiResourcesTargetsV1CredentialSource'; +import { + ControllerApiResourcesTargetsV1CredentialSourceFromJSON, + ControllerApiResourcesTargetsV1CredentialSourceFromJSONTyped, + ControllerApiResourcesTargetsV1CredentialSourceToJSON, + ControllerApiResourcesTargetsV1CredentialSourceToJSONTyped, +} from './ControllerApiResourcesTargetsV1CredentialSource'; +import type { ControllerApiResourcesTargetsV1SessionSecret } from './ControllerApiResourcesTargetsV1SessionSecret'; +import { + ControllerApiResourcesTargetsV1SessionSecretFromJSON, + ControllerApiResourcesTargetsV1SessionSecretFromJSONTyped, + ControllerApiResourcesTargetsV1SessionSecretToJSON, + ControllerApiResourcesTargetsV1SessionSecretToJSONTyped, +} from './ControllerApiResourcesTargetsV1SessionSecret'; + +/** + * Credential information for a session. + * @export + * @interface ControllerApiResourcesTargetsV1SessionCredential + */ +export interface ControllerApiResourcesTargetsV1SessionCredential { + /** + * + * @type {ControllerApiResourcesTargetsV1CredentialSource} + * @memberof ControllerApiResourcesTargetsV1SessionCredential + */ + credentialSource?: ControllerApiResourcesTargetsV1CredentialSource; + /** + * + * @type {ControllerApiResourcesTargetsV1SessionSecret} + * @memberof ControllerApiResourcesTargetsV1SessionCredential + */ + secret?: ControllerApiResourcesTargetsV1SessionSecret; + /** + * Output only. The fields of the strongly typed credential, empty if the credential type of the + * credential source is unspecified. + * @type {object} + * @memberof ControllerApiResourcesTargetsV1SessionCredential + */ + readonly credential?: object; +} + +/** + * Check if a given object implements the ControllerApiResourcesTargetsV1SessionCredential interface. + */ +export function instanceOfControllerApiResourcesTargetsV1SessionCredential(value: object): value is ControllerApiResourcesTargetsV1SessionCredential { + return true; +} + +export function ControllerApiResourcesTargetsV1SessionCredentialFromJSON(json: any): ControllerApiResourcesTargetsV1SessionCredential { + return ControllerApiResourcesTargetsV1SessionCredentialFromJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1SessionCredentialFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1SessionCredential { + if (json == null) { + return json; + } + return { + + 'credentialSource': json['credential_source'] == null ? undefined : ControllerApiResourcesTargetsV1CredentialSourceFromJSON(json['credential_source']), + 'secret': json['secret'] == null ? undefined : ControllerApiResourcesTargetsV1SessionSecretFromJSON(json['secret']), + 'credential': json['credential'] == null ? undefined : json['credential'], + }; +} + +export function ControllerApiResourcesTargetsV1SessionCredentialToJSON(json: any): ControllerApiResourcesTargetsV1SessionCredential { + return ControllerApiResourcesTargetsV1SessionCredentialToJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1SessionCredentialToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'credential_source': ControllerApiResourcesTargetsV1CredentialSourceToJSON(value['credentialSource']), + 'secret': ControllerApiResourcesTargetsV1SessionSecretToJSON(value['secret']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionSecret.ts b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionSecret.ts new file mode 100644 index 000000000..749816805 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1SessionSecret.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * The actual secret for a session credential. + * @export + * @interface ControllerApiResourcesTargetsV1SessionSecret + */ +export interface ControllerApiResourcesTargetsV1SessionSecret { + /** + * Output only. The base64-encoded value representing the raw bytes from the + * credential provider. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1SessionSecret + */ + readonly raw?: string; + /** + * Output only. The decoded raw string, if a JSON object. + * @type {object} + * @memberof ControllerApiResourcesTargetsV1SessionSecret + */ + readonly decoded?: object; +} + +/** + * Check if a given object implements the ControllerApiResourcesTargetsV1SessionSecret interface. + */ +export function instanceOfControllerApiResourcesTargetsV1SessionSecret(value: object): value is ControllerApiResourcesTargetsV1SessionSecret { + return true; +} + +export function ControllerApiResourcesTargetsV1SessionSecretFromJSON(json: any): ControllerApiResourcesTargetsV1SessionSecret { + return ControllerApiResourcesTargetsV1SessionSecretFromJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1SessionSecretFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1SessionSecret { + if (json == null) { + return json; + } + return { + + 'raw': json['raw'] == null ? undefined : json['raw'], + 'decoded': json['decoded'] == null ? undefined : json['decoded'], + }; +} + +export function ControllerApiResourcesTargetsV1SessionSecretToJSON(json: any): ControllerApiResourcesTargetsV1SessionSecret { + return ControllerApiResourcesTargetsV1SessionSecretToJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1SessionSecretToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1Target.ts b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1Target.ts new file mode 100644 index 000000000..01ebc2d40 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1Target.ts @@ -0,0 +1,279 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1HostSource } from './ControllerApiResourcesTargetsV1HostSource'; +import { + ControllerApiResourcesTargetsV1HostSourceFromJSON, + ControllerApiResourcesTargetsV1HostSourceFromJSONTyped, + ControllerApiResourcesTargetsV1HostSourceToJSON, + ControllerApiResourcesTargetsV1HostSourceToJSONTyped, +} from './ControllerApiResourcesTargetsV1HostSource'; +import type { ControllerApiResourcesTargetsV1Alias } from './ControllerApiResourcesTargetsV1Alias'; +import { + ControllerApiResourcesTargetsV1AliasFromJSON, + ControllerApiResourcesTargetsV1AliasFromJSONTyped, + ControllerApiResourcesTargetsV1AliasToJSON, + ControllerApiResourcesTargetsV1AliasToJSONTyped, +} from './ControllerApiResourcesTargetsV1Alias'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; +import type { ControllerApiResourcesTargetsV1CredentialSource } from './ControllerApiResourcesTargetsV1CredentialSource'; +import { + ControllerApiResourcesTargetsV1CredentialSourceFromJSON, + ControllerApiResourcesTargetsV1CredentialSourceFromJSONTyped, + ControllerApiResourcesTargetsV1CredentialSourceToJSON, + ControllerApiResourcesTargetsV1CredentialSourceToJSONTyped, +} from './ControllerApiResourcesTargetsV1CredentialSource'; + +/** + * + * @export + * @interface ControllerApiResourcesTargetsV1Target + */ +export interface ControllerApiResourcesTargetsV1Target { + /** + * Output only. The ID of the resource. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly id?: string; + /** + * The Scope of of this resource. This must be defined for creation of this resource, but is otherwise output only. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Target + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesTargetsV1Target + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Required name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Target + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Target + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesTargetsV1Target + */ + version?: number; + /** + * The type of the Target. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Target + */ + type?: string; + /** + * Output only. The IDs of the Host Sources associated with this Target. + * @type {Array} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly hostSourceIds?: Array; + /** + * Output only. The Host Sources associated with this Target. + * @type {Array} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly hostSources?: Array; + /** + * Maximum total lifetime of a created Session, in seconds. + * @type {number} + * @memberof ControllerApiResourcesTargetsV1Target + */ + sessionMaxSeconds?: number; + /** + * Maximum number of connections allowed in a Session. Unlimited is indicated by the value -1. + * @type {number} + * @memberof ControllerApiResourcesTargetsV1Target + */ + sessionConnectionLimit?: number; + /** + * Optional boolean expression to filter the workers that are allowed to satisfy this request. + * Deprecated; use egress or ingress worker filters instead. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Target + */ + workerFilter?: string; + /** + * Optional boolean expressions to filter the egress workers that are allowed to satisfy this request. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Target + */ + egressWorkerFilter?: string; + /** + * Optional boolean expressions to filter the ingress workers that are allowed to satisfy this request. + * Unsupported on OSS. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Target + */ + ingressWorkerFilter?: string; + /** + * Output only. The IDs of the brokered credential source ids associated with this Target. + * @type {Array} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly brokeredCredentialSourceIds?: Array; + /** + * Output only. The brokered credential sources associated with this Target. + * @type {Array} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly brokeredCredentialSources?: Array; + /** + * Output only. The IDs of the injected application credential source ids associated with this Target. + * @type {Array} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly injectedApplicationCredentialSourceIds?: Array; + /** + * Output only. The injected application credential sources associated with this Target. + * @type {Array} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly injectedApplicationCredentialSources?: Array; + /** + * The attributes that are applicable for the specific Target. + * @type {object} + * @memberof ControllerApiResourcesTargetsV1Target + */ + attributes?: object; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly authorizedActions?: Array; + /** + * Optional string value that represents a network resource and is used when establishing a session. + * @type {string} + * @memberof ControllerApiResourcesTargetsV1Target + */ + address?: string; + /** + * Output only. The aliases that point to this Target. + * @type {Array} + * @memberof ControllerApiResourcesTargetsV1Target + */ + readonly aliases?: Array; + /** + * Input only. with_aliases specify the aliases that should be created when + * the target is created. This field is only usable at target creation time. + * @type {Array} + * @memberof ControllerApiResourcesTargetsV1Target + */ + withAliases?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesTargetsV1Target interface. + */ +export function instanceOfControllerApiResourcesTargetsV1Target(value: object): value is ControllerApiResourcesTargetsV1Target { + return true; +} + +export function ControllerApiResourcesTargetsV1TargetFromJSON(json: any): ControllerApiResourcesTargetsV1Target { + return ControllerApiResourcesTargetsV1TargetFromJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1TargetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1Target { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'type': json['type'] == null ? undefined : json['type'], + 'hostSourceIds': json['host_source_ids'] == null ? undefined : json['host_source_ids'], + 'hostSources': json['host_sources'] == null ? undefined : ((json['host_sources'] as Array).map(ControllerApiResourcesTargetsV1HostSourceFromJSON)), + 'sessionMaxSeconds': json['session_max_seconds'] == null ? undefined : json['session_max_seconds'], + 'sessionConnectionLimit': json['session_connection_limit'] == null ? undefined : json['session_connection_limit'], + 'workerFilter': json['worker_filter'] == null ? undefined : json['worker_filter'], + 'egressWorkerFilter': json['egress_worker_filter'] == null ? undefined : json['egress_worker_filter'], + 'ingressWorkerFilter': json['ingress_worker_filter'] == null ? undefined : json['ingress_worker_filter'], + 'brokeredCredentialSourceIds': json['brokered_credential_source_ids'] == null ? undefined : json['brokered_credential_source_ids'], + 'brokeredCredentialSources': json['brokered_credential_sources'] == null ? undefined : ((json['brokered_credential_sources'] as Array).map(ControllerApiResourcesTargetsV1CredentialSourceFromJSON)), + 'injectedApplicationCredentialSourceIds': json['injected_application_credential_source_ids'] == null ? undefined : json['injected_application_credential_source_ids'], + 'injectedApplicationCredentialSources': json['injected_application_credential_sources'] == null ? undefined : ((json['injected_application_credential_sources'] as Array).map(ControllerApiResourcesTargetsV1CredentialSourceFromJSON)), + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + 'address': json['address'] == null ? undefined : json['address'], + 'aliases': json['aliases'] == null ? undefined : ((json['aliases'] as Array).map(ControllerApiResourcesTargetsV1AliasFromJSON)), + 'withAliases': json['with_aliases'] == null ? undefined : ((json['with_aliases'] as Array).map(ControllerApiResourcesTargetsV1AliasFromJSON)), + }; +} + +export function ControllerApiResourcesTargetsV1TargetToJSON(json: any): ControllerApiResourcesTargetsV1Target { + return ControllerApiResourcesTargetsV1TargetToJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1TargetToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'type': value['type'], + 'session_max_seconds': value['sessionMaxSeconds'], + 'session_connection_limit': value['sessionConnectionLimit'], + 'worker_filter': value['workerFilter'], + 'egress_worker_filter': value['egressWorkerFilter'], + 'ingress_worker_filter': value['ingressWorkerFilter'], + 'attributes': value['attributes'], + 'address': value['address'], + 'with_aliases': value['withAliases'] == null ? undefined : ((value['withAliases'] as Array).map(ControllerApiResourcesTargetsV1AliasToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1TargetAliasAttributes.ts b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1TargetAliasAttributes.ts new file mode 100644 index 000000000..5e1f8265a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesTargetsV1TargetAliasAttributes.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1AuthorizeSessionArguments } from './ControllerApiResourcesTargetsV1AuthorizeSessionArguments'; +import { + ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSON, + ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSONTyped, + ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSON, + ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSONTyped, +} from './ControllerApiResourcesTargetsV1AuthorizeSessionArguments'; + +/** + * + * @export + * @interface ControllerApiResourcesTargetsV1TargetAliasAttributes + */ +export interface ControllerApiResourcesTargetsV1TargetAliasAttributes { + /** + * + * @type {ControllerApiResourcesTargetsV1AuthorizeSessionArguments} + * @memberof ControllerApiResourcesTargetsV1TargetAliasAttributes + */ + authorizeSessionArguments?: ControllerApiResourcesTargetsV1AuthorizeSessionArguments; +} + +/** + * Check if a given object implements the ControllerApiResourcesTargetsV1TargetAliasAttributes interface. + */ +export function instanceOfControllerApiResourcesTargetsV1TargetAliasAttributes(value: object): value is ControllerApiResourcesTargetsV1TargetAliasAttributes { + return true; +} + +export function ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSON(json: any): ControllerApiResourcesTargetsV1TargetAliasAttributes { + return ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1TargetAliasAttributes { + if (json == null) { + return json; + } + return { + + 'authorizeSessionArguments': json['authorize_session_arguments'] == null ? undefined : ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSON(json['authorize_session_arguments']), + }; +} + +export function ControllerApiResourcesTargetsV1TargetAliasAttributesToJSON(json: any): ControllerApiResourcesTargetsV1TargetAliasAttributes { + return ControllerApiResourcesTargetsV1TargetAliasAttributesToJSONTyped(json, false); +} + +export function ControllerApiResourcesTargetsV1TargetAliasAttributesToJSONTyped(value?: ControllerApiResourcesTargetsV1TargetAliasAttributes | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'authorize_session_arguments': ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSON(value['authorizeSessionArguments']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesUsersV1Account.ts b/e2e-tests/api-client/models/ControllerApiResourcesUsersV1Account.ts new file mode 100644 index 000000000..99fb48242 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesUsersV1Account.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesUsersV1Account + */ +export interface ControllerApiResourcesUsersV1Account { + /** + * Output only. The ID of the Account. + * @type {string} + * @memberof ControllerApiResourcesUsersV1Account + */ + readonly id?: string; + /** + * Output only. The Scope containing the Account. + * @type {string} + * @memberof ControllerApiResourcesUsersV1Account + */ + readonly scopeId?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesUsersV1Account interface. + */ +export function instanceOfControllerApiResourcesUsersV1Account(value: object): value is ControllerApiResourcesUsersV1Account { + return true; +} + +export function ControllerApiResourcesUsersV1AccountFromJSON(json: any): ControllerApiResourcesUsersV1Account { + return ControllerApiResourcesUsersV1AccountFromJSONTyped(json, false); +} + +export function ControllerApiResourcesUsersV1AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesUsersV1Account { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + }; +} + +export function ControllerApiResourcesUsersV1AccountToJSON(json: any): ControllerApiResourcesUsersV1Account { + return ControllerApiResourcesUsersV1AccountToJSONTyped(json, false); +} + +export function ControllerApiResourcesUsersV1AccountToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesUsersV1User.ts b/e2e-tests/api-client/models/ControllerApiResourcesUsersV1User.ts new file mode 100644 index 000000000..353cfafad --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesUsersV1User.ts @@ -0,0 +1,183 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesUsersV1Account } from './ControllerApiResourcesUsersV1Account'; +import { + ControllerApiResourcesUsersV1AccountFromJSON, + ControllerApiResourcesUsersV1AccountFromJSONTyped, + ControllerApiResourcesUsersV1AccountToJSON, + ControllerApiResourcesUsersV1AccountToJSONTyped, +} from './ControllerApiResourcesUsersV1Account'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesUsersV1User + */ +export interface ControllerApiResourcesUsersV1User { + /** + * Output only. The ID of the User. + * @type {string} + * @memberof ControllerApiResourcesUsersV1User + */ + readonly id?: string; + /** + * The ID of the Scope this resource is in. + * @type {string} + * @memberof ControllerApiResourcesUsersV1User + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesUsersV1User + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesUsersV1User + */ + name?: string; + /** + * Optional user-set description for identification purposes. + * @type {string} + * @memberof ControllerApiResourcesUsersV1User + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesUsersV1User + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesUsersV1User + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesUsersV1User + */ + version?: number; + /** + * Output only. Contains the list of Account IDs linked to this User. + * @type {Array} + * @memberof ControllerApiResourcesUsersV1User + */ + readonly accountIds?: Array; + /** + * Output only. The Accounts linked to this User. + * @type {Array} + * @memberof ControllerApiResourcesUsersV1User + */ + readonly accounts?: Array; + /** + * Output only. The available actions on this resource for this user. + * @type {Array} + * @memberof ControllerApiResourcesUsersV1User + */ + readonly authorizedActions?: Array; + /** + * + * @type {string} + * @memberof ControllerApiResourcesUsersV1User + */ + readonly loginName?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesUsersV1User + */ + readonly fullName?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesUsersV1User + */ + readonly email?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesUsersV1User + */ + readonly primaryAccountId?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesUsersV1User interface. + */ +export function instanceOfControllerApiResourcesUsersV1User(value: object): value is ControllerApiResourcesUsersV1User { + return true; +} + +export function ControllerApiResourcesUsersV1UserFromJSON(json: any): ControllerApiResourcesUsersV1User { + return ControllerApiResourcesUsersV1UserFromJSONTyped(json, false); +} + +export function ControllerApiResourcesUsersV1UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesUsersV1User { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'accountIds': json['account_ids'] == null ? undefined : json['account_ids'], + 'accounts': json['accounts'] == null ? undefined : ((json['accounts'] as Array).map(ControllerApiResourcesUsersV1AccountFromJSON)), + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + 'loginName': json['login_name'] == null ? undefined : json['login_name'], + 'fullName': json['full_name'] == null ? undefined : json['full_name'], + 'email': json['email'] == null ? undefined : json['email'], + 'primaryAccountId': json['primary_account_id'] == null ? undefined : json['primary_account_id'], + }; +} + +export function ControllerApiResourcesUsersV1UserToJSON(json: any): ControllerApiResourcesUsersV1User { + return ControllerApiResourcesUsersV1UserToJSONTyped(json, false); +} + +export function ControllerApiResourcesUsersV1UserToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1Certificate.ts b/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1Certificate.ts new file mode 100644 index 000000000..c4ea5fd92 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1Certificate.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesWorkersV1Certificate + */ +export interface ControllerApiResourcesWorkersV1Certificate { + /** + * + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Certificate + */ + readonly id?: string; + /** + * + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Certificate + */ + readonly publicKeySha256?: string; + /** + * + * @type {Date} + * @memberof ControllerApiResourcesWorkersV1Certificate + */ + readonly notBeforeTime?: Date; + /** + * + * @type {Date} + * @memberof ControllerApiResourcesWorkersV1Certificate + */ + readonly notAfterTime?: Date; +} + +/** + * Check if a given object implements the ControllerApiResourcesWorkersV1Certificate interface. + */ +export function instanceOfControllerApiResourcesWorkersV1Certificate(value: object): value is ControllerApiResourcesWorkersV1Certificate { + return true; +} + +export function ControllerApiResourcesWorkersV1CertificateFromJSON(json: any): ControllerApiResourcesWorkersV1Certificate { + return ControllerApiResourcesWorkersV1CertificateFromJSONTyped(json, false); +} + +export function ControllerApiResourcesWorkersV1CertificateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesWorkersV1Certificate { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'publicKeySha256': json['public_key_sha256'] == null ? undefined : json['public_key_sha256'], + 'notBeforeTime': json['not_before_time'] == null ? undefined : (new Date(json['not_before_time'])), + 'notAfterTime': json['not_after_time'] == null ? undefined : (new Date(json['not_after_time'])), + }; +} + +export function ControllerApiResourcesWorkersV1CertificateToJSON(json: any): ControllerApiResourcesWorkersV1Certificate { + return ControllerApiResourcesWorkersV1CertificateToJSONTyped(json, false); +} + +export function ControllerApiResourcesWorkersV1CertificateToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1CertificateAuthority.ts b/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1CertificateAuthority.ts new file mode 100644 index 000000000..d3a71f27c --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1CertificateAuthority.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1Certificate } from './ControllerApiResourcesWorkersV1Certificate'; +import { + ControllerApiResourcesWorkersV1CertificateFromJSON, + ControllerApiResourcesWorkersV1CertificateFromJSONTyped, + ControllerApiResourcesWorkersV1CertificateToJSON, + ControllerApiResourcesWorkersV1CertificateToJSONTyped, +} from './ControllerApiResourcesWorkersV1Certificate'; + +/** + * + * @export + * @interface ControllerApiResourcesWorkersV1CertificateAuthority + */ +export interface ControllerApiResourcesWorkersV1CertificateAuthority { + /** + * + * @type {Array} + * @memberof ControllerApiResourcesWorkersV1CertificateAuthority + */ + certs?: Array; +} + +/** + * Check if a given object implements the ControllerApiResourcesWorkersV1CertificateAuthority interface. + */ +export function instanceOfControllerApiResourcesWorkersV1CertificateAuthority(value: object): value is ControllerApiResourcesWorkersV1CertificateAuthority { + return true; +} + +export function ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON(json: any): ControllerApiResourcesWorkersV1CertificateAuthority { + return ControllerApiResourcesWorkersV1CertificateAuthorityFromJSONTyped(json, false); +} + +export function ControllerApiResourcesWorkersV1CertificateAuthorityFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesWorkersV1CertificateAuthority { + if (json == null) { + return json; + } + return { + + 'certs': json['certs'] == null ? undefined : ((json['certs'] as Array).map(ControllerApiResourcesWorkersV1CertificateFromJSON)), + }; +} + +export function ControllerApiResourcesWorkersV1CertificateAuthorityToJSON(json: any): ControllerApiResourcesWorkersV1CertificateAuthority { + return ControllerApiResourcesWorkersV1CertificateAuthorityToJSONTyped(json, false); +} + +export function ControllerApiResourcesWorkersV1CertificateAuthorityToJSONTyped(value?: ControllerApiResourcesWorkersV1CertificateAuthority | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'certs': value['certs'] == null ? undefined : ((value['certs'] as Array).map(ControllerApiResourcesWorkersV1CertificateToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1RemoteStoragePermissions.ts b/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1RemoteStoragePermissions.ts new file mode 100644 index 000000000..ff3aaee8d --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1RemoteStoragePermissions.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiResourcesWorkersV1RemoteStoragePermissions + */ +export interface ControllerApiResourcesWorkersV1RemoteStoragePermissions { + /** + * Output only. The status of the write permission state for the given storage bucket. + * Possible values are: unknown, error, and ok. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1RemoteStoragePermissions + */ + readonly write?: string; + /** + * Output only. The status of the read permission state for the given storage bucket. + * Possible values are: unknown, error, and ok. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1RemoteStoragePermissions + */ + readonly read?: string; + /** + * Output only. The status of the delete permission state for the given storage bucket. + * Possible values are: unknown, error, and ok. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1RemoteStoragePermissions + */ + readonly _delete?: string; +} + +/** + * Check if a given object implements the ControllerApiResourcesWorkersV1RemoteStoragePermissions interface. + */ +export function instanceOfControllerApiResourcesWorkersV1RemoteStoragePermissions(value: object): value is ControllerApiResourcesWorkersV1RemoteStoragePermissions { + return true; +} + +export function ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSON(json: any): ControllerApiResourcesWorkersV1RemoteStoragePermissions { + return ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSONTyped(json, false); +} + +export function ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesWorkersV1RemoteStoragePermissions { + if (json == null) { + return json; + } + return { + + 'write': json['write'] == null ? undefined : json['write'], + 'read': json['read'] == null ? undefined : json['read'], + '_delete': json['delete'] == null ? undefined : json['delete'], + }; +} + +export function ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSON(json: any): ControllerApiResourcesWorkersV1RemoteStoragePermissions { + return ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSONTyped(json, false); +} + +export function ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1RemoteStorageState.ts b/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1RemoteStorageState.ts new file mode 100644 index 000000000..d8956671f --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1RemoteStorageState.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1RemoteStoragePermissions } from './ControllerApiResourcesWorkersV1RemoteStoragePermissions'; +import { + ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSON, + ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSONTyped, + ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSON, + ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSONTyped, +} from './ControllerApiResourcesWorkersV1RemoteStoragePermissions'; + +/** + * + * @export + * @interface ControllerApiResourcesWorkersV1RemoteStorageState + */ +export interface ControllerApiResourcesWorkersV1RemoteStorageState { + /** + * Output only. The overall health status of the storage bucket. The possible values include: error and available. + * The status exists in an available state if each remote storage permission state does not have an error. An unknown remote + * storage permission state does not affect the overall health status. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1RemoteStorageState + */ + readonly status?: string; + /** + * + * @type {ControllerApiResourcesWorkersV1RemoteStoragePermissions} + * @memberof ControllerApiResourcesWorkersV1RemoteStorageState + */ + permissions?: ControllerApiResourcesWorkersV1RemoteStoragePermissions; +} + +/** + * Check if a given object implements the ControllerApiResourcesWorkersV1RemoteStorageState interface. + */ +export function instanceOfControllerApiResourcesWorkersV1RemoteStorageState(value: object): value is ControllerApiResourcesWorkersV1RemoteStorageState { + return true; +} + +export function ControllerApiResourcesWorkersV1RemoteStorageStateFromJSON(json: any): ControllerApiResourcesWorkersV1RemoteStorageState { + return ControllerApiResourcesWorkersV1RemoteStorageStateFromJSONTyped(json, false); +} + +export function ControllerApiResourcesWorkersV1RemoteStorageStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesWorkersV1RemoteStorageState { + if (json == null) { + return json; + } + return { + + 'status': json['status'] == null ? undefined : json['status'], + 'permissions': json['permissions'] == null ? undefined : ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSON(json['permissions']), + }; +} + +export function ControllerApiResourcesWorkersV1RemoteStorageStateToJSON(json: any): ControllerApiResourcesWorkersV1RemoteStorageState { + return ControllerApiResourcesWorkersV1RemoteStorageStateToJSONTyped(json, false); +} + +export function ControllerApiResourcesWorkersV1RemoteStorageStateToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'permissions': ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSON(value['permissions']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1Worker.ts b/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1Worker.ts new file mode 100644 index 000000000..4dbbebe6e --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiResourcesWorkersV1Worker.ts @@ -0,0 +1,242 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1RemoteStorageState } from './ControllerApiResourcesWorkersV1RemoteStorageState'; +import { + ControllerApiResourcesWorkersV1RemoteStorageStateFromJSON, + ControllerApiResourcesWorkersV1RemoteStorageStateFromJSONTyped, + ControllerApiResourcesWorkersV1RemoteStorageStateToJSON, + ControllerApiResourcesWorkersV1RemoteStorageStateToJSONTyped, +} from './ControllerApiResourcesWorkersV1RemoteStorageState'; +import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo'; +import { + ControllerApiResourcesScopesV1ScopeInfoFromJSON, + ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped, + ControllerApiResourcesScopesV1ScopeInfoToJSON, + ControllerApiResourcesScopesV1ScopeInfoToJSONTyped, +} from './ControllerApiResourcesScopesV1ScopeInfo'; + +/** + * + * @export + * @interface ControllerApiResourcesWorkersV1Worker + */ +export interface ControllerApiResourcesWorkersV1Worker { + /** + * Output only. The ID of the User. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly id?: string; + /** + * The ID of the Scope this resource is in. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + scopeId?: string; + /** + * + * @type {ControllerApiResourcesScopesV1ScopeInfo} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + scope?: ControllerApiResourcesScopesV1ScopeInfo; + /** + * Optional name for identification purposes. Can only be set through the API + * for `pki`-type workers; read-only for `kms`-type workers. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + name?: string; + /** + * Optional user-set description for identification purposes. Can only be set + * through the API for `pki`-type workers; read-only for `kms`-type workers. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + description?: string; + /** + * Output only. The time this resource was created. + * @type {Date} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly createdTime?: Date; + /** + * Output only. The time this resource was last updated. + * @type {Date} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly updatedTime?: Date; + /** + * Version is used in mutation requests, after the initial creation, to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + version?: number; + /** + * Output only. The address that this worker is reachable at, as sourced from + * the worker's configuration file. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly address?: string; + /** + * Output only. The deduplicated union of the tags reported by the worker from + * its configuration and any tags added through other means. This is used + * when applying worker filters. + * @type {{ [key: string]: Array; }} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly canonicalTags?: { [key: string]: Array; }; + /** + * Output only. The tags set in the worker's configuration file. + * @type {{ [key: string]: Array; }} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly configTags?: { [key: string]: Array; }; + /** + * Output only. The time this worker daemon last reported its status. + * @type {Date} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly lastStatusTime?: Date; + /** + * + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + workerGeneratedAuthToken?: string; + /** + * Output only. An activation token that can be given to a worker to correlate + * it to the created resource. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly controllerGeneratedActivationToken?: string; + /** + * Output only. The number of connections that this worker is currently handling. + * @type {number} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly activeConnectionCount?: number; + /** + * Output only. The type of the worker, denoted by how it authenticates: `pki` + * or `kms`. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly type?: string; + /** + * Output only. The api tags set for the worker. + * @type {{ [key: string]: Array; }} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly apiTags?: { [key: string]: Array; }; + /** + * Output only. The version of the Boundary binary the worker is running. + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly releaseVersion?: string; + /** + * Output only. The ids of the workers directly connected to this worker. + * @type {Array} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly directlyConnectedDownstreamWorkers?: Array; + /** + * Output only. The available actions on this resource for the requester. + * @type {Array} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly authorizedActions?: Array; + /** + * + * @type {string} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly localStorageState?: string; + /** + * Output only. The remote_storage_state indicats the permission state of the storage buckets that the Worker + * is actively using. The possible permission state types include: write, read, and delete. The possible + * permission state values include: unknown, error, and ok. + * @type {{ [key: string]: ControllerApiResourcesWorkersV1RemoteStorageState; }} + * @memberof ControllerApiResourcesWorkersV1Worker + */ + readonly remoteStorageState?: { [key: string]: ControllerApiResourcesWorkersV1RemoteStorageState; }; +} + +/** + * Check if a given object implements the ControllerApiResourcesWorkersV1Worker interface. + */ +export function instanceOfControllerApiResourcesWorkersV1Worker(value: object): value is ControllerApiResourcesWorkersV1Worker { + return true; +} + +export function ControllerApiResourcesWorkersV1WorkerFromJSON(json: any): ControllerApiResourcesWorkersV1Worker { + return ControllerApiResourcesWorkersV1WorkerFromJSONTyped(json, false); +} + +export function ControllerApiResourcesWorkersV1WorkerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesWorkersV1Worker { + if (json == null) { + return json; + } + return { + + 'id': json['id'] == null ? undefined : json['id'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']), + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + 'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])), + 'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])), + 'version': json['version'] == null ? undefined : json['version'], + 'address': json['address'] == null ? undefined : json['address'], + 'canonicalTags': json['canonical_tags'] == null ? undefined : json['canonical_tags'], + 'configTags': json['config_tags'] == null ? undefined : json['config_tags'], + 'lastStatusTime': json['last_status_time'] == null ? undefined : (new Date(json['last_status_time'])), + 'workerGeneratedAuthToken': json['worker_generated_auth_token'] == null ? undefined : json['worker_generated_auth_token'], + 'controllerGeneratedActivationToken': json['controller_generated_activation_token'] == null ? undefined : json['controller_generated_activation_token'], + 'activeConnectionCount': json['active_connection_count'] == null ? undefined : json['active_connection_count'], + 'type': json['type'] == null ? undefined : json['type'], + 'apiTags': json['api_tags'] == null ? undefined : json['api_tags'], + 'releaseVersion': json['release_version'] == null ? undefined : json['release_version'], + 'directlyConnectedDownstreamWorkers': json['directly_connected_downstream_workers'] == null ? undefined : json['directly_connected_downstream_workers'], + 'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'], + 'localStorageState': json['local_storage_state'] == null ? undefined : json['local_storage_state'], + 'remoteStorageState': json['remote_storage_state'] == null ? undefined : (mapValues(json['remote_storage_state'], ControllerApiResourcesWorkersV1RemoteStorageStateFromJSON)), + }; +} + +export function ControllerApiResourcesWorkersV1WorkerToJSON(json: any): ControllerApiResourcesWorkersV1Worker { + return ControllerApiResourcesWorkersV1WorkerToJSONTyped(json, false); +} + +export function ControllerApiResourcesWorkersV1WorkerToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']), + 'name': value['name'], + 'description': value['description'], + 'version': value['version'], + 'worker_generated_auth_token': value['workerGeneratedAuthToken'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AccountServiceChangePasswordBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AccountServiceChangePasswordBody.ts new file mode 100644 index 000000000..fceb80a36 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AccountServiceChangePasswordBody.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1AccountServiceChangePasswordBody + */ +export interface ControllerApiServicesV1AccountServiceChangePasswordBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1AccountServiceChangePasswordBody + */ + version?: number; + /** + * The current password for the account. + * @type {string} + * @memberof ControllerApiServicesV1AccountServiceChangePasswordBody + */ + currentPassword?: string; + /** + * The new password that should be set. + * @type {string} + * @memberof ControllerApiServicesV1AccountServiceChangePasswordBody + */ + newPassword?: string; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AccountServiceChangePasswordBody interface. + */ +export function instanceOfControllerApiServicesV1AccountServiceChangePasswordBody(value: object): value is ControllerApiServicesV1AccountServiceChangePasswordBody { + return true; +} + +export function ControllerApiServicesV1AccountServiceChangePasswordBodyFromJSON(json: any): ControllerApiServicesV1AccountServiceChangePasswordBody { + return ControllerApiServicesV1AccountServiceChangePasswordBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AccountServiceChangePasswordBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AccountServiceChangePasswordBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'currentPassword': json['current_password'] == null ? undefined : json['current_password'], + 'newPassword': json['new_password'] == null ? undefined : json['new_password'], + }; +} + +export function ControllerApiServicesV1AccountServiceChangePasswordBodyToJSON(json: any): ControllerApiServicesV1AccountServiceChangePasswordBody { + return ControllerApiServicesV1AccountServiceChangePasswordBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AccountServiceChangePasswordBodyToJSONTyped(value?: ControllerApiServicesV1AccountServiceChangePasswordBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'current_password': value['currentPassword'], + 'new_password': value['newPassword'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AccountServiceSetPasswordBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AccountServiceSetPasswordBody.ts new file mode 100644 index 000000000..4613f1ce2 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AccountServiceSetPasswordBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1AccountServiceSetPasswordBody + */ +export interface ControllerApiServicesV1AccountServiceSetPasswordBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1AccountServiceSetPasswordBody + */ + version?: number; + /** + * The password that should be set. + * @type {string} + * @memberof ControllerApiServicesV1AccountServiceSetPasswordBody + */ + password?: string; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AccountServiceSetPasswordBody interface. + */ +export function instanceOfControllerApiServicesV1AccountServiceSetPasswordBody(value: object): value is ControllerApiServicesV1AccountServiceSetPasswordBody { + return true; +} + +export function ControllerApiServicesV1AccountServiceSetPasswordBodyFromJSON(json: any): ControllerApiServicesV1AccountServiceSetPasswordBody { + return ControllerApiServicesV1AccountServiceSetPasswordBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AccountServiceSetPasswordBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AccountServiceSetPasswordBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'password': json['password'] == null ? undefined : json['password'], + }; +} + +export function ControllerApiServicesV1AccountServiceSetPasswordBodyToJSON(json: any): ControllerApiServicesV1AccountServiceSetPasswordBody { + return ControllerApiServicesV1AccountServiceSetPasswordBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AccountServiceSetPasswordBodyToJSONTyped(value?: ControllerApiServicesV1AccountServiceSetPasswordBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'password': value['password'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AddGroupMembersResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AddGroupMembersResponse.ts new file mode 100644 index 000000000..22d2630e0 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AddGroupMembersResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesGroupsV1Group } from './ControllerApiResourcesGroupsV1Group'; +import { + ControllerApiResourcesGroupsV1GroupFromJSON, + ControllerApiResourcesGroupsV1GroupFromJSONTyped, + ControllerApiResourcesGroupsV1GroupToJSON, + ControllerApiResourcesGroupsV1GroupToJSONTyped, +} from './ControllerApiResourcesGroupsV1Group'; + +/** + * + * @export + * @interface ControllerApiServicesV1AddGroupMembersResponse + */ +export interface ControllerApiServicesV1AddGroupMembersResponse { + /** + * + * @type {ControllerApiResourcesGroupsV1Group} + * @memberof ControllerApiServicesV1AddGroupMembersResponse + */ + item?: ControllerApiResourcesGroupsV1Group; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AddGroupMembersResponse interface. + */ +export function instanceOfControllerApiServicesV1AddGroupMembersResponse(value: object): value is ControllerApiServicesV1AddGroupMembersResponse { + return true; +} + +export function ControllerApiServicesV1AddGroupMembersResponseFromJSON(json: any): ControllerApiServicesV1AddGroupMembersResponse { + return ControllerApiServicesV1AddGroupMembersResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddGroupMembersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddGroupMembersResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesGroupsV1GroupFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AddGroupMembersResponseToJSON(json: any): ControllerApiServicesV1AddGroupMembersResponse { + return ControllerApiServicesV1AddGroupMembersResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddGroupMembersResponseToJSONTyped(value?: ControllerApiServicesV1AddGroupMembersResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesGroupsV1GroupToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AddHostSetHostsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AddHostSetHostsResponse.ts new file mode 100644 index 000000000..c3fc4afb9 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AddHostSetHostsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsetsV1HostSet } from './ControllerApiResourcesHostsetsV1HostSet'; +import { + ControllerApiResourcesHostsetsV1HostSetFromJSON, + ControllerApiResourcesHostsetsV1HostSetFromJSONTyped, + ControllerApiResourcesHostsetsV1HostSetToJSON, + ControllerApiResourcesHostsetsV1HostSetToJSONTyped, +} from './ControllerApiResourcesHostsetsV1HostSet'; + +/** + * + * @export + * @interface ControllerApiServicesV1AddHostSetHostsResponse + */ +export interface ControllerApiServicesV1AddHostSetHostsResponse { + /** + * + * @type {ControllerApiResourcesHostsetsV1HostSet} + * @memberof ControllerApiServicesV1AddHostSetHostsResponse + */ + item?: ControllerApiResourcesHostsetsV1HostSet; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AddHostSetHostsResponse interface. + */ +export function instanceOfControllerApiServicesV1AddHostSetHostsResponse(value: object): value is ControllerApiServicesV1AddHostSetHostsResponse { + return true; +} + +export function ControllerApiServicesV1AddHostSetHostsResponseFromJSON(json: any): ControllerApiServicesV1AddHostSetHostsResponse { + return ControllerApiServicesV1AddHostSetHostsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddHostSetHostsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddHostSetHostsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostsetsV1HostSetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AddHostSetHostsResponseToJSON(json: any): ControllerApiServicesV1AddHostSetHostsResponse { + return ControllerApiServicesV1AddHostSetHostsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddHostSetHostsResponseToJSONTyped(value?: ControllerApiServicesV1AddHostSetHostsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesHostsetsV1HostSetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AddRoleGrantScopesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AddRoleGrantScopesResponse.ts new file mode 100644 index 000000000..49663bba1 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AddRoleGrantScopesResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1AddRoleGrantScopesResponse + */ +export interface ControllerApiServicesV1AddRoleGrantScopesResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1AddRoleGrantScopesResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AddRoleGrantScopesResponse interface. + */ +export function instanceOfControllerApiServicesV1AddRoleGrantScopesResponse(value: object): value is ControllerApiServicesV1AddRoleGrantScopesResponse { + return true; +} + +export function ControllerApiServicesV1AddRoleGrantScopesResponseFromJSON(json: any): ControllerApiServicesV1AddRoleGrantScopesResponse { + return ControllerApiServicesV1AddRoleGrantScopesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddRoleGrantScopesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddRoleGrantScopesResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AddRoleGrantScopesResponseToJSON(json: any): ControllerApiServicesV1AddRoleGrantScopesResponse { + return ControllerApiServicesV1AddRoleGrantScopesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddRoleGrantScopesResponseToJSONTyped(value?: ControllerApiServicesV1AddRoleGrantScopesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AddRoleGrantsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AddRoleGrantsResponse.ts new file mode 100644 index 000000000..d3bf50f07 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AddRoleGrantsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1AddRoleGrantsResponse + */ +export interface ControllerApiServicesV1AddRoleGrantsResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1AddRoleGrantsResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AddRoleGrantsResponse interface. + */ +export function instanceOfControllerApiServicesV1AddRoleGrantsResponse(value: object): value is ControllerApiServicesV1AddRoleGrantsResponse { + return true; +} + +export function ControllerApiServicesV1AddRoleGrantsResponseFromJSON(json: any): ControllerApiServicesV1AddRoleGrantsResponse { + return ControllerApiServicesV1AddRoleGrantsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddRoleGrantsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddRoleGrantsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AddRoleGrantsResponseToJSON(json: any): ControllerApiServicesV1AddRoleGrantsResponse { + return ControllerApiServicesV1AddRoleGrantsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddRoleGrantsResponseToJSONTyped(value?: ControllerApiServicesV1AddRoleGrantsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AddRolePrincipalsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AddRolePrincipalsResponse.ts new file mode 100644 index 000000000..748267594 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AddRolePrincipalsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1AddRolePrincipalsResponse + */ +export interface ControllerApiServicesV1AddRolePrincipalsResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1AddRolePrincipalsResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AddRolePrincipalsResponse interface. + */ +export function instanceOfControllerApiServicesV1AddRolePrincipalsResponse(value: object): value is ControllerApiServicesV1AddRolePrincipalsResponse { + return true; +} + +export function ControllerApiServicesV1AddRolePrincipalsResponseFromJSON(json: any): ControllerApiServicesV1AddRolePrincipalsResponse { + return ControllerApiServicesV1AddRolePrincipalsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddRolePrincipalsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddRolePrincipalsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AddRolePrincipalsResponseToJSON(json: any): ControllerApiServicesV1AddRolePrincipalsResponse { + return ControllerApiServicesV1AddRolePrincipalsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddRolePrincipalsResponseToJSONTyped(value?: ControllerApiServicesV1AddRolePrincipalsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AddTargetCredentialSourcesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AddTargetCredentialSourcesResponse.ts new file mode 100644 index 000000000..eb2878027 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AddTargetCredentialSourcesResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target'; +import { + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetFromJSONTyped, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiResourcesTargetsV1TargetToJSONTyped, +} from './ControllerApiResourcesTargetsV1Target'; + +/** + * + * @export + * @interface ControllerApiServicesV1AddTargetCredentialSourcesResponse + */ +export interface ControllerApiServicesV1AddTargetCredentialSourcesResponse { + /** + * + * @type {ControllerApiResourcesTargetsV1Target} + * @memberof ControllerApiServicesV1AddTargetCredentialSourcesResponse + */ + item?: ControllerApiResourcesTargetsV1Target; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AddTargetCredentialSourcesResponse interface. + */ +export function instanceOfControllerApiServicesV1AddTargetCredentialSourcesResponse(value: object): value is ControllerApiServicesV1AddTargetCredentialSourcesResponse { + return true; +} + +export function ControllerApiServicesV1AddTargetCredentialSourcesResponseFromJSON(json: any): ControllerApiServicesV1AddTargetCredentialSourcesResponse { + return ControllerApiServicesV1AddTargetCredentialSourcesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddTargetCredentialSourcesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddTargetCredentialSourcesResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AddTargetCredentialSourcesResponseToJSON(json: any): ControllerApiServicesV1AddTargetCredentialSourcesResponse { + return ControllerApiServicesV1AddTargetCredentialSourcesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddTargetCredentialSourcesResponseToJSONTyped(value?: ControllerApiServicesV1AddTargetCredentialSourcesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AddTargetHostSourcesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AddTargetHostSourcesResponse.ts new file mode 100644 index 000000000..605775f21 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AddTargetHostSourcesResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target'; +import { + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetFromJSONTyped, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiResourcesTargetsV1TargetToJSONTyped, +} from './ControllerApiResourcesTargetsV1Target'; + +/** + * + * @export + * @interface ControllerApiServicesV1AddTargetHostSourcesResponse + */ +export interface ControllerApiServicesV1AddTargetHostSourcesResponse { + /** + * + * @type {ControllerApiResourcesTargetsV1Target} + * @memberof ControllerApiServicesV1AddTargetHostSourcesResponse + */ + item?: ControllerApiResourcesTargetsV1Target; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AddTargetHostSourcesResponse interface. + */ +export function instanceOfControllerApiServicesV1AddTargetHostSourcesResponse(value: object): value is ControllerApiServicesV1AddTargetHostSourcesResponse { + return true; +} + +export function ControllerApiServicesV1AddTargetHostSourcesResponseFromJSON(json: any): ControllerApiServicesV1AddTargetHostSourcesResponse { + return ControllerApiServicesV1AddTargetHostSourcesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddTargetHostSourcesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddTargetHostSourcesResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AddTargetHostSourcesResponseToJSON(json: any): ControllerApiServicesV1AddTargetHostSourcesResponse { + return ControllerApiServicesV1AddTargetHostSourcesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddTargetHostSourcesResponseToJSONTyped(value?: ControllerApiServicesV1AddTargetHostSourcesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AddUserAccountsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AddUserAccountsResponse.ts new file mode 100644 index 000000000..db458a6d5 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AddUserAccountsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesUsersV1User } from './ControllerApiResourcesUsersV1User'; +import { + ControllerApiResourcesUsersV1UserFromJSON, + ControllerApiResourcesUsersV1UserFromJSONTyped, + ControllerApiResourcesUsersV1UserToJSON, + ControllerApiResourcesUsersV1UserToJSONTyped, +} from './ControllerApiResourcesUsersV1User'; + +/** + * + * @export + * @interface ControllerApiServicesV1AddUserAccountsResponse + */ +export interface ControllerApiServicesV1AddUserAccountsResponse { + /** + * + * @type {ControllerApiResourcesUsersV1User} + * @memberof ControllerApiServicesV1AddUserAccountsResponse + */ + item?: ControllerApiResourcesUsersV1User; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AddUserAccountsResponse interface. + */ +export function instanceOfControllerApiServicesV1AddUserAccountsResponse(value: object): value is ControllerApiServicesV1AddUserAccountsResponse { + return true; +} + +export function ControllerApiServicesV1AddUserAccountsResponseFromJSON(json: any): ControllerApiServicesV1AddUserAccountsResponse { + return ControllerApiServicesV1AddUserAccountsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddUserAccountsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddUserAccountsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesUsersV1UserFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AddUserAccountsResponseToJSON(json: any): ControllerApiServicesV1AddUserAccountsResponse { + return ControllerApiServicesV1AddUserAccountsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddUserAccountsResponseToJSONTyped(value?: ControllerApiServicesV1AddUserAccountsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesUsersV1UserToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AddWorkerTagsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AddWorkerTagsResponse.ts new file mode 100644 index 000000000..21734a88b --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AddWorkerTagsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1Worker } from './ControllerApiResourcesWorkersV1Worker'; +import { + ControllerApiResourcesWorkersV1WorkerFromJSON, + ControllerApiResourcesWorkersV1WorkerFromJSONTyped, + ControllerApiResourcesWorkersV1WorkerToJSON, + ControllerApiResourcesWorkersV1WorkerToJSONTyped, +} from './ControllerApiResourcesWorkersV1Worker'; + +/** + * + * @export + * @interface ControllerApiServicesV1AddWorkerTagsResponse + */ +export interface ControllerApiServicesV1AddWorkerTagsResponse { + /** + * + * @type {ControllerApiResourcesWorkersV1Worker} + * @memberof ControllerApiServicesV1AddWorkerTagsResponse + */ + item?: ControllerApiResourcesWorkersV1Worker; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AddWorkerTagsResponse interface. + */ +export function instanceOfControllerApiServicesV1AddWorkerTagsResponse(value: object): value is ControllerApiServicesV1AddWorkerTagsResponse { + return true; +} + +export function ControllerApiServicesV1AddWorkerTagsResponseFromJSON(json: any): ControllerApiServicesV1AddWorkerTagsResponse { + return ControllerApiServicesV1AddWorkerTagsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddWorkerTagsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddWorkerTagsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesWorkersV1WorkerFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AddWorkerTagsResponseToJSON(json: any): ControllerApiServicesV1AddWorkerTagsResponse { + return ControllerApiServicesV1AddWorkerTagsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AddWorkerTagsResponseToJSONTyped(value?: ControllerApiServicesV1AddWorkerTagsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesWorkersV1WorkerToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AttachStoragePolicyResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AttachStoragePolicyResponse.ts new file mode 100644 index 000000000..5a8ed13ed --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AttachStoragePolicyResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1Scope } from './ControllerApiResourcesScopesV1Scope'; +import { + ControllerApiResourcesScopesV1ScopeFromJSON, + ControllerApiResourcesScopesV1ScopeFromJSONTyped, + ControllerApiResourcesScopesV1ScopeToJSON, + ControllerApiResourcesScopesV1ScopeToJSONTyped, +} from './ControllerApiResourcesScopesV1Scope'; + +/** + * + * @export + * @interface ControllerApiServicesV1AttachStoragePolicyResponse + */ +export interface ControllerApiServicesV1AttachStoragePolicyResponse { + /** + * + * @type {ControllerApiResourcesScopesV1Scope} + * @memberof ControllerApiServicesV1AttachStoragePolicyResponse + */ + item?: ControllerApiResourcesScopesV1Scope; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AttachStoragePolicyResponse interface. + */ +export function instanceOfControllerApiServicesV1AttachStoragePolicyResponse(value: object): value is ControllerApiServicesV1AttachStoragePolicyResponse { + return true; +} + +export function ControllerApiServicesV1AttachStoragePolicyResponseFromJSON(json: any): ControllerApiServicesV1AttachStoragePolicyResponse { + return ControllerApiServicesV1AttachStoragePolicyResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AttachStoragePolicyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AttachStoragePolicyResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesScopesV1ScopeFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AttachStoragePolicyResponseToJSON(json: any): ControllerApiServicesV1AttachStoragePolicyResponse { + return ControllerApiServicesV1AttachStoragePolicyResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AttachStoragePolicyResponseToJSONTyped(value?: ControllerApiServicesV1AttachStoragePolicyResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesScopesV1ScopeToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AuthMethodServiceAuthenticateBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AuthMethodServiceAuthenticateBody.ts new file mode 100644 index 000000000..ce56d6498 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AuthMethodServiceAuthenticateBody.ts @@ -0,0 +1,127 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1AuthMethodServiceAuthenticateBody + */ +export interface ControllerApiServicesV1AuthMethodServiceAuthenticateBody { + /** + * This can be "cookie" or "token". If not provided, "token" will be used. "cookie" activates a split-cookie method where the token is split partially between http-only and regular cookies in order + * to keep it safe from rogue JS in the browser. Deprecated, use "type" instead. + * @type {string} + * @memberof ControllerApiServicesV1AuthMethodServiceAuthenticateBody + */ + tokenType?: string; + /** + * This can be "cookie" or "token". If not provided, "token" will be used. "cookie" activates a split-cookie method where the token is split partially between http-only and regular cookies in order + * to keep it safe from rogue JS in the browser. + * @type {string} + * @memberof ControllerApiServicesV1AuthMethodServiceAuthenticateBody + */ + type?: string; + /** + * The attributes that are used to authenticate to the auth method. The schema of this field depends on the type of the auth method. For password auth methods, the parameters are: + * ```json + * { + * "login_name": "login_name", + * "password": "password" + * } + * ``` + * For LDAP auth methods, the parameters are: + * ```json + * { + * "login_name": "login_name", + * "password": "password" + * } + * ``` + * For OIDC auth methods, the parameters are: + * ```json + * { + * "roundtrip_payload": {} + * } + * ``` + * OIDC authentication requires multiple calls to this endpoint. After the initial call and successful authentication, the OIDC provider must redirect the user to the `callback` command: + * ```json + * { + * "code": "code", + * "state": "state", + * "error": "error", + * "error_description": "error_description", + * "error_uri": "error_uri" + * } + * ``` + * Once this has succeded, the issued auth token can be retrieved by using the `token` command: + * ```json + * { + * "token_id": "token_id_from_initial_response" + * } + * ``` + * + * @type {object} + * @memberof ControllerApiServicesV1AuthMethodServiceAuthenticateBody + */ + attributes?: object; + /** + * The command to perform. One of "login", "callback", or "token". + * @type {string} + * @memberof ControllerApiServicesV1AuthMethodServiceAuthenticateBody + */ + command?: string; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AuthMethodServiceAuthenticateBody interface. + */ +export function instanceOfControllerApiServicesV1AuthMethodServiceAuthenticateBody(value: object): value is ControllerApiServicesV1AuthMethodServiceAuthenticateBody { + return true; +} + +export function ControllerApiServicesV1AuthMethodServiceAuthenticateBodyFromJSON(json: any): ControllerApiServicesV1AuthMethodServiceAuthenticateBody { + return ControllerApiServicesV1AuthMethodServiceAuthenticateBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AuthMethodServiceAuthenticateBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AuthMethodServiceAuthenticateBody { + if (json == null) { + return json; + } + return { + + 'tokenType': json['token_type'] == null ? undefined : json['token_type'], + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'command': json['command'] == null ? undefined : json['command'], + }; +} + +export function ControllerApiServicesV1AuthMethodServiceAuthenticateBodyToJSON(json: any): ControllerApiServicesV1AuthMethodServiceAuthenticateBody { + return ControllerApiServicesV1AuthMethodServiceAuthenticateBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AuthMethodServiceAuthenticateBodyToJSONTyped(value?: ControllerApiServicesV1AuthMethodServiceAuthenticateBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'token_type': value['tokenType'], + 'type': value['type'], + 'attributes': value['attributes'], + 'command': value['command'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AuthMethodServiceChangeStateBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AuthMethodServiceChangeStateBody.ts new file mode 100644 index 000000000..224dc47e2 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AuthMethodServiceChangeStateBody.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1AuthMethodServiceChangeStateBody + */ +export interface ControllerApiServicesV1AuthMethodServiceChangeStateBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1AuthMethodServiceChangeStateBody + */ + version?: number; + /** + * The attributes that are applicable for the specific auth method type. The schema of this field depends on the type of the auth method. The only supported auth method type is OIDC. + * For OIDC auth methods, the parameters are: + * ```json + * { + * "state": "active-public", + * "disable_discovered_config_validation": false + * } + * ``` + * + * @type {object} + * @memberof ControllerApiServicesV1AuthMethodServiceChangeStateBody + */ + attributes?: object; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AuthMethodServiceChangeStateBody interface. + */ +export function instanceOfControllerApiServicesV1AuthMethodServiceChangeStateBody(value: object): value is ControllerApiServicesV1AuthMethodServiceChangeStateBody { + return true; +} + +export function ControllerApiServicesV1AuthMethodServiceChangeStateBodyFromJSON(json: any): ControllerApiServicesV1AuthMethodServiceChangeStateBody { + return ControllerApiServicesV1AuthMethodServiceChangeStateBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AuthMethodServiceChangeStateBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AuthMethodServiceChangeStateBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + }; +} + +export function ControllerApiServicesV1AuthMethodServiceChangeStateBodyToJSON(json: any): ControllerApiServicesV1AuthMethodServiceChangeStateBody { + return ControllerApiServicesV1AuthMethodServiceChangeStateBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AuthMethodServiceChangeStateBodyToJSONTyped(value?: ControllerApiServicesV1AuthMethodServiceChangeStateBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'attributes': value['attributes'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AuthenticateResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AuthenticateResponse.ts new file mode 100644 index 000000000..c4cdd0013 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AuthenticateResponse.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1AuthenticateResponse + */ +export interface ControllerApiServicesV1AuthenticateResponse { + /** + * The type of the token returned. Either "cookie" or "token". + * @type {string} + * @memberof ControllerApiServicesV1AuthenticateResponse + */ + type?: string; + /** + * The response attributes that are used to authenticate to the auth method. The schema of this field depends on the type of the auth method. For password, OIDC and LDAP auth methods, the response is an auth token: + * ```json + * { + * "id": "token_id", + * "scope_id": "scope_id", + * "token": "token_string", + * "user_id": "user_id", + * "auth_method_id": "auth_method_id", + * "account_id": "account_id", + * "created_time": "token_created_time", + * "updated_time": "token_updated_time", + * "approximate_last_used_time": "token_approximate_last_used_time", + * "expiration_time": "token_expiration_time" + * } + * ``` + * For OIDC auth methods, the initial parameters are: + * ```json + * { + * "auth_url": "OIDC_auth_url", + * "token_id": "OIDC_token_id" + * } + * ``` + * The `auth_url` is the URL that authenticating user should open in the browser to authenticate with the OIDC provider. The `token_id` should be used in subsequent calls to the `authenticate` endpoint to retrieve the auth token. + * + * @type {object} + * @memberof ControllerApiServicesV1AuthenticateResponse + */ + attributes?: object; + /** + * The command that was performed. + * @type {string} + * @memberof ControllerApiServicesV1AuthenticateResponse + */ + command?: string; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AuthenticateResponse interface. + */ +export function instanceOfControllerApiServicesV1AuthenticateResponse(value: object): value is ControllerApiServicesV1AuthenticateResponse { + return true; +} + +export function ControllerApiServicesV1AuthenticateResponseFromJSON(json: any): ControllerApiServicesV1AuthenticateResponse { + return ControllerApiServicesV1AuthenticateResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AuthenticateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AuthenticateResponse { + if (json == null) { + return json; + } + return { + + 'type': json['type'] == null ? undefined : json['type'], + 'attributes': json['attributes'] == null ? undefined : json['attributes'], + 'command': json['command'] == null ? undefined : json['command'], + }; +} + +export function ControllerApiServicesV1AuthenticateResponseToJSON(json: any): ControllerApiServicesV1AuthenticateResponse { + return ControllerApiServicesV1AuthenticateResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AuthenticateResponseToJSONTyped(value?: ControllerApiServicesV1AuthenticateResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'type': value['type'], + 'attributes': value['attributes'], + 'command': value['command'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1AuthorizeSessionResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1AuthorizeSessionResponse.ts new file mode 100644 index 000000000..dcff9212a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1AuthorizeSessionResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1SessionAuthorization } from './ControllerApiResourcesTargetsV1SessionAuthorization'; +import { + ControllerApiResourcesTargetsV1SessionAuthorizationFromJSON, + ControllerApiResourcesTargetsV1SessionAuthorizationFromJSONTyped, + ControllerApiResourcesTargetsV1SessionAuthorizationToJSON, + ControllerApiResourcesTargetsV1SessionAuthorizationToJSONTyped, +} from './ControllerApiResourcesTargetsV1SessionAuthorization'; + +/** + * + * @export + * @interface ControllerApiServicesV1AuthorizeSessionResponse + */ +export interface ControllerApiServicesV1AuthorizeSessionResponse { + /** + * + * @type {ControllerApiResourcesTargetsV1SessionAuthorization} + * @memberof ControllerApiServicesV1AuthorizeSessionResponse + */ + item?: ControllerApiResourcesTargetsV1SessionAuthorization; +} + +/** + * Check if a given object implements the ControllerApiServicesV1AuthorizeSessionResponse interface. + */ +export function instanceOfControllerApiServicesV1AuthorizeSessionResponse(value: object): value is ControllerApiServicesV1AuthorizeSessionResponse { + return true; +} + +export function ControllerApiServicesV1AuthorizeSessionResponseFromJSON(json: any): ControllerApiServicesV1AuthorizeSessionResponse { + return ControllerApiServicesV1AuthorizeSessionResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1AuthorizeSessionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AuthorizeSessionResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1SessionAuthorizationFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1AuthorizeSessionResponseToJSON(json: any): ControllerApiServicesV1AuthorizeSessionResponse { + return ControllerApiServicesV1AuthorizeSessionResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1AuthorizeSessionResponseToJSONTyped(value?: ControllerApiServicesV1AuthorizeSessionResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesTargetsV1SessionAuthorizationToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CancelSessionResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CancelSessionResponse.ts new file mode 100644 index 000000000..c78e80cdc --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CancelSessionResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionsV1Session } from './ControllerApiResourcesSessionsV1Session'; +import { + ControllerApiResourcesSessionsV1SessionFromJSON, + ControllerApiResourcesSessionsV1SessionFromJSONTyped, + ControllerApiResourcesSessionsV1SessionToJSON, + ControllerApiResourcesSessionsV1SessionToJSONTyped, +} from './ControllerApiResourcesSessionsV1Session'; + +/** + * + * @export + * @interface ControllerApiServicesV1CancelSessionResponse + */ +export interface ControllerApiServicesV1CancelSessionResponse { + /** + * + * @type {ControllerApiResourcesSessionsV1Session} + * @memberof ControllerApiServicesV1CancelSessionResponse + */ + item?: ControllerApiResourcesSessionsV1Session; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CancelSessionResponse interface. + */ +export function instanceOfControllerApiServicesV1CancelSessionResponse(value: object): value is ControllerApiServicesV1CancelSessionResponse { + return true; +} + +export function ControllerApiServicesV1CancelSessionResponseFromJSON(json: any): ControllerApiServicesV1CancelSessionResponse { + return ControllerApiServicesV1CancelSessionResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CancelSessionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CancelSessionResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesSessionsV1SessionFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CancelSessionResponseToJSON(json: any): ControllerApiServicesV1CancelSessionResponse { + return ControllerApiServicesV1CancelSessionResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CancelSessionResponseToJSONTyped(value?: ControllerApiServicesV1CancelSessionResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesSessionsV1SessionToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ChangePasswordResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ChangePasswordResponse.ts new file mode 100644 index 000000000..86a162d76 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ChangePasswordResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAccountsV1Account } from './ControllerApiResourcesAccountsV1Account'; +import { + ControllerApiResourcesAccountsV1AccountFromJSON, + ControllerApiResourcesAccountsV1AccountFromJSONTyped, + ControllerApiResourcesAccountsV1AccountToJSON, + ControllerApiResourcesAccountsV1AccountToJSONTyped, +} from './ControllerApiResourcesAccountsV1Account'; + +/** + * + * @export + * @interface ControllerApiServicesV1ChangePasswordResponse + */ +export interface ControllerApiServicesV1ChangePasswordResponse { + /** + * + * @type {ControllerApiResourcesAccountsV1Account} + * @memberof ControllerApiServicesV1ChangePasswordResponse + */ + item?: ControllerApiResourcesAccountsV1Account; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ChangePasswordResponse interface. + */ +export function instanceOfControllerApiServicesV1ChangePasswordResponse(value: object): value is ControllerApiServicesV1ChangePasswordResponse { + return true; +} + +export function ControllerApiServicesV1ChangePasswordResponseFromJSON(json: any): ControllerApiServicesV1ChangePasswordResponse { + return ControllerApiServicesV1ChangePasswordResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ChangePasswordResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ChangePasswordResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesAccountsV1AccountFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1ChangePasswordResponseToJSON(json: any): ControllerApiServicesV1ChangePasswordResponse { + return ControllerApiServicesV1ChangePasswordResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ChangePasswordResponseToJSONTyped(value?: ControllerApiServicesV1ChangePasswordResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesAccountsV1AccountToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ChangeStateResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ChangeStateResponse.ts new file mode 100644 index 000000000..960901b8e --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ChangeStateResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAuthmethodsV1AuthMethod } from './ControllerApiResourcesAuthmethodsV1AuthMethod'; +import { + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSONTyped, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSONTyped, +} from './ControllerApiResourcesAuthmethodsV1AuthMethod'; + +/** + * + * @export + * @interface ControllerApiServicesV1ChangeStateResponse + */ +export interface ControllerApiServicesV1ChangeStateResponse { + /** + * + * @type {ControllerApiResourcesAuthmethodsV1AuthMethod} + * @memberof ControllerApiServicesV1ChangeStateResponse + */ + item?: ControllerApiResourcesAuthmethodsV1AuthMethod; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ChangeStateResponse interface. + */ +export function instanceOfControllerApiServicesV1ChangeStateResponse(value: object): value is ControllerApiServicesV1ChangeStateResponse { + return true; +} + +export function ControllerApiServicesV1ChangeStateResponseFromJSON(json: any): ControllerApiServicesV1ChangeStateResponse { + return ControllerApiServicesV1ChangeStateResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ChangeStateResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ChangeStateResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1ChangeStateResponseToJSON(json: any): ControllerApiServicesV1ChangeStateResponse { + return ControllerApiServicesV1ChangeStateResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ChangeStateResponseToJSONTyped(value?: ControllerApiServicesV1ChangeStateResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesAuthmethodsV1AuthMethodToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateAccountResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateAccountResponse.ts new file mode 100644 index 000000000..fea77ae36 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateAccountResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAccountsV1Account } from './ControllerApiResourcesAccountsV1Account'; +import { + ControllerApiResourcesAccountsV1AccountFromJSON, + ControllerApiResourcesAccountsV1AccountFromJSONTyped, + ControllerApiResourcesAccountsV1AccountToJSON, + ControllerApiResourcesAccountsV1AccountToJSONTyped, +} from './ControllerApiResourcesAccountsV1Account'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateAccountResponse + */ +export interface ControllerApiServicesV1CreateAccountResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateAccountResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesAccountsV1Account} + * @memberof ControllerApiServicesV1CreateAccountResponse + */ + item?: ControllerApiResourcesAccountsV1Account; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateAccountResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateAccountResponse(value: object): value is ControllerApiServicesV1CreateAccountResponse { + return true; +} + +export function ControllerApiServicesV1CreateAccountResponseFromJSON(json: any): ControllerApiServicesV1CreateAccountResponse { + return ControllerApiServicesV1CreateAccountResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateAccountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateAccountResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesAccountsV1AccountFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateAccountResponseToJSON(json: any): ControllerApiServicesV1CreateAccountResponse { + return ControllerApiServicesV1CreateAccountResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateAccountResponseToJSONTyped(value?: ControllerApiServicesV1CreateAccountResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesAccountsV1AccountToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateAliasResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateAliasResponse.ts new file mode 100644 index 000000000..5fc940989 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateAliasResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAliasesV1Alias } from './ControllerApiResourcesAliasesV1Alias'; +import { + ControllerApiResourcesAliasesV1AliasFromJSON, + ControllerApiResourcesAliasesV1AliasFromJSONTyped, + ControllerApiResourcesAliasesV1AliasToJSON, + ControllerApiResourcesAliasesV1AliasToJSONTyped, +} from './ControllerApiResourcesAliasesV1Alias'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateAliasResponse + */ +export interface ControllerApiServicesV1CreateAliasResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateAliasResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesAliasesV1Alias} + * @memberof ControllerApiServicesV1CreateAliasResponse + */ + item?: ControllerApiResourcesAliasesV1Alias; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateAliasResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateAliasResponse(value: object): value is ControllerApiServicesV1CreateAliasResponse { + return true; +} + +export function ControllerApiServicesV1CreateAliasResponseFromJSON(json: any): ControllerApiServicesV1CreateAliasResponse { + return ControllerApiServicesV1CreateAliasResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateAliasResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateAliasResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesAliasesV1AliasFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateAliasResponseToJSON(json: any): ControllerApiServicesV1CreateAliasResponse { + return ControllerApiServicesV1CreateAliasResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateAliasResponseToJSONTyped(value?: ControllerApiServicesV1CreateAliasResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesAliasesV1AliasToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateAuthMethodResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateAuthMethodResponse.ts new file mode 100644 index 000000000..b402f8820 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateAuthMethodResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAuthmethodsV1AuthMethod } from './ControllerApiResourcesAuthmethodsV1AuthMethod'; +import { + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSONTyped, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSONTyped, +} from './ControllerApiResourcesAuthmethodsV1AuthMethod'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateAuthMethodResponse + */ +export interface ControllerApiServicesV1CreateAuthMethodResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateAuthMethodResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesAuthmethodsV1AuthMethod} + * @memberof ControllerApiServicesV1CreateAuthMethodResponse + */ + item?: ControllerApiResourcesAuthmethodsV1AuthMethod; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateAuthMethodResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateAuthMethodResponse(value: object): value is ControllerApiServicesV1CreateAuthMethodResponse { + return true; +} + +export function ControllerApiServicesV1CreateAuthMethodResponseFromJSON(json: any): ControllerApiServicesV1CreateAuthMethodResponse { + return ControllerApiServicesV1CreateAuthMethodResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateAuthMethodResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateAuthMethodResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateAuthMethodResponseToJSON(json: any): ControllerApiServicesV1CreateAuthMethodResponse { + return ControllerApiServicesV1CreateAuthMethodResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateAuthMethodResponseToJSONTyped(value?: ControllerApiServicesV1CreateAuthMethodResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesAuthmethodsV1AuthMethodToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateControllerLedResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateControllerLedResponse.ts new file mode 100644 index 000000000..5ccda6553 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateControllerLedResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1Worker } from './ControllerApiResourcesWorkersV1Worker'; +import { + ControllerApiResourcesWorkersV1WorkerFromJSON, + ControllerApiResourcesWorkersV1WorkerFromJSONTyped, + ControllerApiResourcesWorkersV1WorkerToJSON, + ControllerApiResourcesWorkersV1WorkerToJSONTyped, +} from './ControllerApiResourcesWorkersV1Worker'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateControllerLedResponse + */ +export interface ControllerApiServicesV1CreateControllerLedResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateControllerLedResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesWorkersV1Worker} + * @memberof ControllerApiServicesV1CreateControllerLedResponse + */ + item?: ControllerApiResourcesWorkersV1Worker; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateControllerLedResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateControllerLedResponse(value: object): value is ControllerApiServicesV1CreateControllerLedResponse { + return true; +} + +export function ControllerApiServicesV1CreateControllerLedResponseFromJSON(json: any): ControllerApiServicesV1CreateControllerLedResponse { + return ControllerApiServicesV1CreateControllerLedResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateControllerLedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateControllerLedResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesWorkersV1WorkerFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateControllerLedResponseToJSON(json: any): ControllerApiServicesV1CreateControllerLedResponse { + return ControllerApiServicesV1CreateControllerLedResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateControllerLedResponseToJSONTyped(value?: ControllerApiServicesV1CreateControllerLedResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesWorkersV1WorkerToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialLibraryResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialLibraryResponse.ts new file mode 100644 index 000000000..af59dca8b --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialLibraryResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentiallibrariesV1CredentialLibrary } from './ControllerApiResourcesCredentiallibrariesV1CredentialLibrary'; +import { + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSONTyped, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSONTyped, +} from './ControllerApiResourcesCredentiallibrariesV1CredentialLibrary'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateCredentialLibraryResponse + */ +export interface ControllerApiServicesV1CreateCredentialLibraryResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateCredentialLibraryResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesCredentiallibrariesV1CredentialLibrary} + * @memberof ControllerApiServicesV1CreateCredentialLibraryResponse + */ + item?: ControllerApiResourcesCredentiallibrariesV1CredentialLibrary; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateCredentialLibraryResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateCredentialLibraryResponse(value: object): value is ControllerApiServicesV1CreateCredentialLibraryResponse { + return true; +} + +export function ControllerApiServicesV1CreateCredentialLibraryResponseFromJSON(json: any): ControllerApiServicesV1CreateCredentialLibraryResponse { + return ControllerApiServicesV1CreateCredentialLibraryResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateCredentialLibraryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateCredentialLibraryResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateCredentialLibraryResponseToJSON(json: any): ControllerApiServicesV1CreateCredentialLibraryResponse { + return ControllerApiServicesV1CreateCredentialLibraryResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateCredentialLibraryResponseToJSONTyped(value?: ControllerApiServicesV1CreateCredentialLibraryResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialResponse.ts new file mode 100644 index 000000000..a32ce515a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentialsV1Credential } from './ControllerApiResourcesCredentialsV1Credential'; +import { + ControllerApiResourcesCredentialsV1CredentialFromJSON, + ControllerApiResourcesCredentialsV1CredentialFromJSONTyped, + ControllerApiResourcesCredentialsV1CredentialToJSON, + ControllerApiResourcesCredentialsV1CredentialToJSONTyped, +} from './ControllerApiResourcesCredentialsV1Credential'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateCredentialResponse + */ +export interface ControllerApiServicesV1CreateCredentialResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateCredentialResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesCredentialsV1Credential} + * @memberof ControllerApiServicesV1CreateCredentialResponse + */ + item?: ControllerApiResourcesCredentialsV1Credential; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateCredentialResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateCredentialResponse(value: object): value is ControllerApiServicesV1CreateCredentialResponse { + return true; +} + +export function ControllerApiServicesV1CreateCredentialResponseFromJSON(json: any): ControllerApiServicesV1CreateCredentialResponse { + return ControllerApiServicesV1CreateCredentialResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateCredentialResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateCredentialResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesCredentialsV1CredentialFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateCredentialResponseToJSON(json: any): ControllerApiServicesV1CreateCredentialResponse { + return ControllerApiServicesV1CreateCredentialResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateCredentialResponseToJSONTyped(value?: ControllerApiServicesV1CreateCredentialResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesCredentialsV1CredentialToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialStoreResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialStoreResponse.ts new file mode 100644 index 000000000..b3ff8b705 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateCredentialStoreResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentialstoresV1CredentialStore } from './ControllerApiResourcesCredentialstoresV1CredentialStore'; +import { + ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON, + ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSONTyped, + ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON, + ControllerApiResourcesCredentialstoresV1CredentialStoreToJSONTyped, +} from './ControllerApiResourcesCredentialstoresV1CredentialStore'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateCredentialStoreResponse + */ +export interface ControllerApiServicesV1CreateCredentialStoreResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateCredentialStoreResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesCredentialstoresV1CredentialStore} + * @memberof ControllerApiServicesV1CreateCredentialStoreResponse + */ + item?: ControllerApiResourcesCredentialstoresV1CredentialStore; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateCredentialStoreResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateCredentialStoreResponse(value: object): value is ControllerApiServicesV1CreateCredentialStoreResponse { + return true; +} + +export function ControllerApiServicesV1CreateCredentialStoreResponseFromJSON(json: any): ControllerApiServicesV1CreateCredentialStoreResponse { + return ControllerApiServicesV1CreateCredentialStoreResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateCredentialStoreResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateCredentialStoreResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateCredentialStoreResponseToJSON(json: any): ControllerApiServicesV1CreateCredentialStoreResponse { + return ControllerApiServicesV1CreateCredentialStoreResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateCredentialStoreResponseToJSONTyped(value?: ControllerApiServicesV1CreateCredentialStoreResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateGroupResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateGroupResponse.ts new file mode 100644 index 000000000..839437a23 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateGroupResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesGroupsV1Group } from './ControllerApiResourcesGroupsV1Group'; +import { + ControllerApiResourcesGroupsV1GroupFromJSON, + ControllerApiResourcesGroupsV1GroupFromJSONTyped, + ControllerApiResourcesGroupsV1GroupToJSON, + ControllerApiResourcesGroupsV1GroupToJSONTyped, +} from './ControllerApiResourcesGroupsV1Group'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateGroupResponse + */ +export interface ControllerApiServicesV1CreateGroupResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateGroupResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesGroupsV1Group} + * @memberof ControllerApiServicesV1CreateGroupResponse + */ + item?: ControllerApiResourcesGroupsV1Group; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateGroupResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateGroupResponse(value: object): value is ControllerApiServicesV1CreateGroupResponse { + return true; +} + +export function ControllerApiServicesV1CreateGroupResponseFromJSON(json: any): ControllerApiServicesV1CreateGroupResponse { + return ControllerApiServicesV1CreateGroupResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateGroupResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateGroupResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesGroupsV1GroupFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateGroupResponseToJSON(json: any): ControllerApiServicesV1CreateGroupResponse { + return ControllerApiServicesV1CreateGroupResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateGroupResponseToJSONTyped(value?: ControllerApiServicesV1CreateGroupResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesGroupsV1GroupToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateHostCatalogResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateHostCatalogResponse.ts new file mode 100644 index 000000000..d3f8c66a5 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateHostCatalogResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostcatalogsV1HostCatalog } from './ControllerApiResourcesHostcatalogsV1HostCatalog'; +import { + ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON, + ControllerApiResourcesHostcatalogsV1HostCatalogFromJSONTyped, + ControllerApiResourcesHostcatalogsV1HostCatalogToJSON, + ControllerApiResourcesHostcatalogsV1HostCatalogToJSONTyped, +} from './ControllerApiResourcesHostcatalogsV1HostCatalog'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateHostCatalogResponse + */ +export interface ControllerApiServicesV1CreateHostCatalogResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateHostCatalogResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesHostcatalogsV1HostCatalog} + * @memberof ControllerApiServicesV1CreateHostCatalogResponse + */ + item?: ControllerApiResourcesHostcatalogsV1HostCatalog; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateHostCatalogResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateHostCatalogResponse(value: object): value is ControllerApiServicesV1CreateHostCatalogResponse { + return true; +} + +export function ControllerApiServicesV1CreateHostCatalogResponseFromJSON(json: any): ControllerApiServicesV1CreateHostCatalogResponse { + return ControllerApiServicesV1CreateHostCatalogResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateHostCatalogResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateHostCatalogResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateHostCatalogResponseToJSON(json: any): ControllerApiServicesV1CreateHostCatalogResponse { + return ControllerApiServicesV1CreateHostCatalogResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateHostCatalogResponseToJSONTyped(value?: ControllerApiServicesV1CreateHostCatalogResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesHostcatalogsV1HostCatalogToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateHostResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateHostResponse.ts new file mode 100644 index 000000000..c2b478f39 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateHostResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsV1Host } from './ControllerApiResourcesHostsV1Host'; +import { + ControllerApiResourcesHostsV1HostFromJSON, + ControllerApiResourcesHostsV1HostFromJSONTyped, + ControllerApiResourcesHostsV1HostToJSON, + ControllerApiResourcesHostsV1HostToJSONTyped, +} from './ControllerApiResourcesHostsV1Host'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateHostResponse + */ +export interface ControllerApiServicesV1CreateHostResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateHostResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesHostsV1Host} + * @memberof ControllerApiServicesV1CreateHostResponse + */ + item?: ControllerApiResourcesHostsV1Host; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateHostResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateHostResponse(value: object): value is ControllerApiServicesV1CreateHostResponse { + return true; +} + +export function ControllerApiServicesV1CreateHostResponseFromJSON(json: any): ControllerApiServicesV1CreateHostResponse { + return ControllerApiServicesV1CreateHostResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateHostResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateHostResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostsV1HostFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateHostResponseToJSON(json: any): ControllerApiServicesV1CreateHostResponse { + return ControllerApiServicesV1CreateHostResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateHostResponseToJSONTyped(value?: ControllerApiServicesV1CreateHostResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesHostsV1HostToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateHostSetResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateHostSetResponse.ts new file mode 100644 index 000000000..b472a084a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateHostSetResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsetsV1HostSet } from './ControllerApiResourcesHostsetsV1HostSet'; +import { + ControllerApiResourcesHostsetsV1HostSetFromJSON, + ControllerApiResourcesHostsetsV1HostSetFromJSONTyped, + ControllerApiResourcesHostsetsV1HostSetToJSON, + ControllerApiResourcesHostsetsV1HostSetToJSONTyped, +} from './ControllerApiResourcesHostsetsV1HostSet'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateHostSetResponse + */ +export interface ControllerApiServicesV1CreateHostSetResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateHostSetResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesHostsetsV1HostSet} + * @memberof ControllerApiServicesV1CreateHostSetResponse + */ + item?: ControllerApiResourcesHostsetsV1HostSet; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateHostSetResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateHostSetResponse(value: object): value is ControllerApiServicesV1CreateHostSetResponse { + return true; +} + +export function ControllerApiServicesV1CreateHostSetResponseFromJSON(json: any): ControllerApiServicesV1CreateHostSetResponse { + return ControllerApiServicesV1CreateHostSetResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateHostSetResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateHostSetResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostsetsV1HostSetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateHostSetResponseToJSON(json: any): ControllerApiServicesV1CreateHostSetResponse { + return ControllerApiServicesV1CreateHostSetResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateHostSetResponseToJSONTyped(value?: ControllerApiServicesV1CreateHostSetResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesHostsetsV1HostSetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateManagedGroupResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateManagedGroupResponse.ts new file mode 100644 index 000000000..b5eebcf7f --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateManagedGroupResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesManagedgroupsV1ManagedGroup } from './ControllerApiResourcesManagedgroupsV1ManagedGroup'; +import { + ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON, + ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSONTyped, + ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON, + ControllerApiResourcesManagedgroupsV1ManagedGroupToJSONTyped, +} from './ControllerApiResourcesManagedgroupsV1ManagedGroup'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateManagedGroupResponse + */ +export interface ControllerApiServicesV1CreateManagedGroupResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateManagedGroupResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesManagedgroupsV1ManagedGroup} + * @memberof ControllerApiServicesV1CreateManagedGroupResponse + */ + item?: ControllerApiResourcesManagedgroupsV1ManagedGroup; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateManagedGroupResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateManagedGroupResponse(value: object): value is ControllerApiServicesV1CreateManagedGroupResponse { + return true; +} + +export function ControllerApiServicesV1CreateManagedGroupResponseFromJSON(json: any): ControllerApiServicesV1CreateManagedGroupResponse { + return ControllerApiServicesV1CreateManagedGroupResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateManagedGroupResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateManagedGroupResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateManagedGroupResponseToJSON(json: any): ControllerApiServicesV1CreateManagedGroupResponse { + return ControllerApiServicesV1CreateManagedGroupResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateManagedGroupResponseToJSONTyped(value?: ControllerApiServicesV1CreateManagedGroupResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreatePolicyResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreatePolicyResponse.ts new file mode 100644 index 000000000..248e84c50 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreatePolicyResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesPoliciesV1Policy } from './ControllerApiResourcesPoliciesV1Policy'; +import { + ControllerApiResourcesPoliciesV1PolicyFromJSON, + ControllerApiResourcesPoliciesV1PolicyFromJSONTyped, + ControllerApiResourcesPoliciesV1PolicyToJSON, + ControllerApiResourcesPoliciesV1PolicyToJSONTyped, +} from './ControllerApiResourcesPoliciesV1Policy'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreatePolicyResponse + */ +export interface ControllerApiServicesV1CreatePolicyResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreatePolicyResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesPoliciesV1Policy} + * @memberof ControllerApiServicesV1CreatePolicyResponse + */ + item?: ControllerApiResourcesPoliciesV1Policy; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreatePolicyResponse interface. + */ +export function instanceOfControllerApiServicesV1CreatePolicyResponse(value: object): value is ControllerApiServicesV1CreatePolicyResponse { + return true; +} + +export function ControllerApiServicesV1CreatePolicyResponseFromJSON(json: any): ControllerApiServicesV1CreatePolicyResponse { + return ControllerApiServicesV1CreatePolicyResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreatePolicyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreatePolicyResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesPoliciesV1PolicyFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreatePolicyResponseToJSON(json: any): ControllerApiServicesV1CreatePolicyResponse { + return ControllerApiServicesV1CreatePolicyResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreatePolicyResponseToJSONTyped(value?: ControllerApiServicesV1CreatePolicyResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesPoliciesV1PolicyToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateRoleResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateRoleResponse.ts new file mode 100644 index 000000000..6c9c8f0b6 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateRoleResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateRoleResponse + */ +export interface ControllerApiServicesV1CreateRoleResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateRoleResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1CreateRoleResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateRoleResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateRoleResponse(value: object): value is ControllerApiServicesV1CreateRoleResponse { + return true; +} + +export function ControllerApiServicesV1CreateRoleResponseFromJSON(json: any): ControllerApiServicesV1CreateRoleResponse { + return ControllerApiServicesV1CreateRoleResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateRoleResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateRoleResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateRoleResponseToJSON(json: any): ControllerApiServicesV1CreateRoleResponse { + return ControllerApiServicesV1CreateRoleResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateRoleResponseToJSONTyped(value?: ControllerApiServicesV1CreateRoleResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateScopeResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateScopeResponse.ts new file mode 100644 index 000000000..9ee911a42 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateScopeResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1Scope } from './ControllerApiResourcesScopesV1Scope'; +import { + ControllerApiResourcesScopesV1ScopeFromJSON, + ControllerApiResourcesScopesV1ScopeFromJSONTyped, + ControllerApiResourcesScopesV1ScopeToJSON, + ControllerApiResourcesScopesV1ScopeToJSONTyped, +} from './ControllerApiResourcesScopesV1Scope'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateScopeResponse + */ +export interface ControllerApiServicesV1CreateScopeResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateScopeResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesScopesV1Scope} + * @memberof ControllerApiServicesV1CreateScopeResponse + */ + item?: ControllerApiResourcesScopesV1Scope; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateScopeResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateScopeResponse(value: object): value is ControllerApiServicesV1CreateScopeResponse { + return true; +} + +export function ControllerApiServicesV1CreateScopeResponseFromJSON(json: any): ControllerApiServicesV1CreateScopeResponse { + return ControllerApiServicesV1CreateScopeResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateScopeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateScopeResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesScopesV1ScopeFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateScopeResponseToJSON(json: any): ControllerApiServicesV1CreateScopeResponse { + return ControllerApiServicesV1CreateScopeResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateScopeResponseToJSONTyped(value?: ControllerApiServicesV1CreateScopeResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesScopesV1ScopeToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateStorageBucketResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateStorageBucketResponse.ts new file mode 100644 index 000000000..dbf5359d8 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateStorageBucketResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesStoragebucketsV1StorageBucket } from './ControllerApiResourcesStoragebucketsV1StorageBucket'; +import { + ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON, + ControllerApiResourcesStoragebucketsV1StorageBucketFromJSONTyped, + ControllerApiResourcesStoragebucketsV1StorageBucketToJSON, + ControllerApiResourcesStoragebucketsV1StorageBucketToJSONTyped, +} from './ControllerApiResourcesStoragebucketsV1StorageBucket'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateStorageBucketResponse + */ +export interface ControllerApiServicesV1CreateStorageBucketResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateStorageBucketResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesStoragebucketsV1StorageBucket} + * @memberof ControllerApiServicesV1CreateStorageBucketResponse + */ + item?: ControllerApiResourcesStoragebucketsV1StorageBucket; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateStorageBucketResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateStorageBucketResponse(value: object): value is ControllerApiServicesV1CreateStorageBucketResponse { + return true; +} + +export function ControllerApiServicesV1CreateStorageBucketResponseFromJSON(json: any): ControllerApiServicesV1CreateStorageBucketResponse { + return ControllerApiServicesV1CreateStorageBucketResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateStorageBucketResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateStorageBucketResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateStorageBucketResponseToJSON(json: any): ControllerApiServicesV1CreateStorageBucketResponse { + return ControllerApiServicesV1CreateStorageBucketResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateStorageBucketResponseToJSONTyped(value?: ControllerApiServicesV1CreateStorageBucketResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesStoragebucketsV1StorageBucketToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateTargetResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateTargetResponse.ts new file mode 100644 index 000000000..291f9d942 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateTargetResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target'; +import { + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetFromJSONTyped, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiResourcesTargetsV1TargetToJSONTyped, +} from './ControllerApiResourcesTargetsV1Target'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateTargetResponse + */ +export interface ControllerApiServicesV1CreateTargetResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateTargetResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesTargetsV1Target} + * @memberof ControllerApiServicesV1CreateTargetResponse + */ + item?: ControllerApiResourcesTargetsV1Target; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateTargetResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateTargetResponse(value: object): value is ControllerApiServicesV1CreateTargetResponse { + return true; +} + +export function ControllerApiServicesV1CreateTargetResponseFromJSON(json: any): ControllerApiServicesV1CreateTargetResponse { + return ControllerApiServicesV1CreateTargetResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateTargetResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateTargetResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateTargetResponseToJSON(json: any): ControllerApiServicesV1CreateTargetResponse { + return ControllerApiServicesV1CreateTargetResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateTargetResponseToJSONTyped(value?: ControllerApiServicesV1CreateTargetResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateUserResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateUserResponse.ts new file mode 100644 index 000000000..85869fb74 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateUserResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesUsersV1User } from './ControllerApiResourcesUsersV1User'; +import { + ControllerApiResourcesUsersV1UserFromJSON, + ControllerApiResourcesUsersV1UserFromJSONTyped, + ControllerApiResourcesUsersV1UserToJSON, + ControllerApiResourcesUsersV1UserToJSONTyped, +} from './ControllerApiResourcesUsersV1User'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateUserResponse + */ +export interface ControllerApiServicesV1CreateUserResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateUserResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesUsersV1User} + * @memberof ControllerApiServicesV1CreateUserResponse + */ + item?: ControllerApiResourcesUsersV1User; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateUserResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateUserResponse(value: object): value is ControllerApiServicesV1CreateUserResponse { + return true; +} + +export function ControllerApiServicesV1CreateUserResponseFromJSON(json: any): ControllerApiServicesV1CreateUserResponse { + return ControllerApiServicesV1CreateUserResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateUserResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateUserResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesUsersV1UserFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateUserResponseToJSON(json: any): ControllerApiServicesV1CreateUserResponse { + return ControllerApiServicesV1CreateUserResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateUserResponseToJSONTyped(value?: ControllerApiServicesV1CreateUserResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesUsersV1UserToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1CreateWorkerLedResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1CreateWorkerLedResponse.ts new file mode 100644 index 000000000..fba76c9d8 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1CreateWorkerLedResponse.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1Worker } from './ControllerApiResourcesWorkersV1Worker'; +import { + ControllerApiResourcesWorkersV1WorkerFromJSON, + ControllerApiResourcesWorkersV1WorkerFromJSONTyped, + ControllerApiResourcesWorkersV1WorkerToJSON, + ControllerApiResourcesWorkersV1WorkerToJSONTyped, +} from './ControllerApiResourcesWorkersV1Worker'; + +/** + * + * @export + * @interface ControllerApiServicesV1CreateWorkerLedResponse + */ +export interface ControllerApiServicesV1CreateWorkerLedResponse { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1CreateWorkerLedResponse + */ + uri?: string; + /** + * + * @type {ControllerApiResourcesWorkersV1Worker} + * @memberof ControllerApiServicesV1CreateWorkerLedResponse + */ + item?: ControllerApiResourcesWorkersV1Worker; +} + +/** + * Check if a given object implements the ControllerApiServicesV1CreateWorkerLedResponse interface. + */ +export function instanceOfControllerApiServicesV1CreateWorkerLedResponse(value: object): value is ControllerApiServicesV1CreateWorkerLedResponse { + return true; +} + +export function ControllerApiServicesV1CreateWorkerLedResponseFromJSON(json: any): ControllerApiServicesV1CreateWorkerLedResponse { + return ControllerApiServicesV1CreateWorkerLedResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateWorkerLedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1CreateWorkerLedResponse { + if (json == null) { + return json; + } + return { + + 'uri': json['uri'] == null ? undefined : json['uri'], + 'item': json['item'] == null ? undefined : ControllerApiResourcesWorkersV1WorkerFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1CreateWorkerLedResponseToJSON(json: any): ControllerApiServicesV1CreateWorkerLedResponse { + return ControllerApiServicesV1CreateWorkerLedResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1CreateWorkerLedResponseToJSONTyped(value?: ControllerApiServicesV1CreateWorkerLedResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'uri': value['uri'], + 'item': ControllerApiResourcesWorkersV1WorkerToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1DestroyKeyVersionRequest.ts b/e2e-tests/api-client/models/ControllerApiServicesV1DestroyKeyVersionRequest.ts new file mode 100644 index 000000000..1ef794dc2 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1DestroyKeyVersionRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1DestroyKeyVersionRequest + */ +export interface ControllerApiServicesV1DestroyKeyVersionRequest { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1DestroyKeyVersionRequest + */ + scopeId?: string; + /** + * + * @type {string} + * @memberof ControllerApiServicesV1DestroyKeyVersionRequest + */ + keyVersionId?: string; +} + +/** + * Check if a given object implements the ControllerApiServicesV1DestroyKeyVersionRequest interface. + */ +export function instanceOfControllerApiServicesV1DestroyKeyVersionRequest(value: object): value is ControllerApiServicesV1DestroyKeyVersionRequest { + return true; +} + +export function ControllerApiServicesV1DestroyKeyVersionRequestFromJSON(json: any): ControllerApiServicesV1DestroyKeyVersionRequest { + return ControllerApiServicesV1DestroyKeyVersionRequestFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1DestroyKeyVersionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1DestroyKeyVersionRequest { + if (json == null) { + return json; + } + return { + + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'keyVersionId': json['key_version_id'] == null ? undefined : json['key_version_id'], + }; +} + +export function ControllerApiServicesV1DestroyKeyVersionRequestToJSON(json: any): ControllerApiServicesV1DestroyKeyVersionRequest { + return ControllerApiServicesV1DestroyKeyVersionRequestToJSONTyped(json, false); +} + +export function ControllerApiServicesV1DestroyKeyVersionRequestToJSONTyped(value?: ControllerApiServicesV1DestroyKeyVersionRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'key_version_id': value['keyVersionId'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1DestroyKeyVersionResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1DestroyKeyVersionResponse.ts new file mode 100644 index 000000000..58095efd1 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1DestroyKeyVersionResponse.ts @@ -0,0 +1,67 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1DestroyKeyVersionResponse + */ +export interface ControllerApiServicesV1DestroyKeyVersionResponse { + /** + * Destruction state. One of "pending" or "completed". + * Use GET /v1/scopes/{scope_id}:list-key-version-destruction-jobs + * to monitor pending destruction jobs. + * @type {string} + * @memberof ControllerApiServicesV1DestroyKeyVersionResponse + */ + state?: string; +} + +/** + * Check if a given object implements the ControllerApiServicesV1DestroyKeyVersionResponse interface. + */ +export function instanceOfControllerApiServicesV1DestroyKeyVersionResponse(value: object): value is ControllerApiServicesV1DestroyKeyVersionResponse { + return true; +} + +export function ControllerApiServicesV1DestroyKeyVersionResponseFromJSON(json: any): ControllerApiServicesV1DestroyKeyVersionResponse { + return ControllerApiServicesV1DestroyKeyVersionResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1DestroyKeyVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1DestroyKeyVersionResponse { + if (json == null) { + return json; + } + return { + + 'state': json['state'] == null ? undefined : json['state'], + }; +} + +export function ControllerApiServicesV1DestroyKeyVersionResponseToJSON(json: any): ControllerApiServicesV1DestroyKeyVersionResponse { + return ControllerApiServicesV1DestroyKeyVersionResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1DestroyKeyVersionResponseToJSONTyped(value?: ControllerApiServicesV1DestroyKeyVersionResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'state': value['state'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1DetachStoragePolicyResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1DetachStoragePolicyResponse.ts new file mode 100644 index 000000000..368639ac6 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1DetachStoragePolicyResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1Scope } from './ControllerApiResourcesScopesV1Scope'; +import { + ControllerApiResourcesScopesV1ScopeFromJSON, + ControllerApiResourcesScopesV1ScopeFromJSONTyped, + ControllerApiResourcesScopesV1ScopeToJSON, + ControllerApiResourcesScopesV1ScopeToJSONTyped, +} from './ControllerApiResourcesScopesV1Scope'; + +/** + * + * @export + * @interface ControllerApiServicesV1DetachStoragePolicyResponse + */ +export interface ControllerApiServicesV1DetachStoragePolicyResponse { + /** + * + * @type {ControllerApiResourcesScopesV1Scope} + * @memberof ControllerApiServicesV1DetachStoragePolicyResponse + */ + item?: ControllerApiResourcesScopesV1Scope; +} + +/** + * Check if a given object implements the ControllerApiServicesV1DetachStoragePolicyResponse interface. + */ +export function instanceOfControllerApiServicesV1DetachStoragePolicyResponse(value: object): value is ControllerApiServicesV1DetachStoragePolicyResponse { + return true; +} + +export function ControllerApiServicesV1DetachStoragePolicyResponseFromJSON(json: any): ControllerApiServicesV1DetachStoragePolicyResponse { + return ControllerApiServicesV1DetachStoragePolicyResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1DetachStoragePolicyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1DetachStoragePolicyResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesScopesV1ScopeFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1DetachStoragePolicyResponseToJSON(json: any): ControllerApiServicesV1DetachStoragePolicyResponse { + return ControllerApiServicesV1DetachStoragePolicyResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1DetachStoragePolicyResponseToJSONTyped(value?: ControllerApiServicesV1DetachStoragePolicyResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesScopesV1ScopeToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetAccountResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetAccountResponse.ts new file mode 100644 index 000000000..271b0a9d6 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetAccountResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAccountsV1Account } from './ControllerApiResourcesAccountsV1Account'; +import { + ControllerApiResourcesAccountsV1AccountFromJSON, + ControllerApiResourcesAccountsV1AccountFromJSONTyped, + ControllerApiResourcesAccountsV1AccountToJSON, + ControllerApiResourcesAccountsV1AccountToJSONTyped, +} from './ControllerApiResourcesAccountsV1Account'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetAccountResponse + */ +export interface ControllerApiServicesV1GetAccountResponse { + /** + * + * @type {ControllerApiResourcesAccountsV1Account} + * @memberof ControllerApiServicesV1GetAccountResponse + */ + item?: ControllerApiResourcesAccountsV1Account; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetAccountResponse interface. + */ +export function instanceOfControllerApiServicesV1GetAccountResponse(value: object): value is ControllerApiServicesV1GetAccountResponse { + return true; +} + +export function ControllerApiServicesV1GetAccountResponseFromJSON(json: any): ControllerApiServicesV1GetAccountResponse { + return ControllerApiServicesV1GetAccountResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetAccountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetAccountResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesAccountsV1AccountFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetAccountResponseToJSON(json: any): ControllerApiServicesV1GetAccountResponse { + return ControllerApiServicesV1GetAccountResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetAccountResponseToJSONTyped(value?: ControllerApiServicesV1GetAccountResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesAccountsV1AccountToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetAliasResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetAliasResponse.ts new file mode 100644 index 000000000..2c7f45263 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetAliasResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAliasesV1Alias } from './ControllerApiResourcesAliasesV1Alias'; +import { + ControllerApiResourcesAliasesV1AliasFromJSON, + ControllerApiResourcesAliasesV1AliasFromJSONTyped, + ControllerApiResourcesAliasesV1AliasToJSON, + ControllerApiResourcesAliasesV1AliasToJSONTyped, +} from './ControllerApiResourcesAliasesV1Alias'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetAliasResponse + */ +export interface ControllerApiServicesV1GetAliasResponse { + /** + * + * @type {ControllerApiResourcesAliasesV1Alias} + * @memberof ControllerApiServicesV1GetAliasResponse + */ + item?: ControllerApiResourcesAliasesV1Alias; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetAliasResponse interface. + */ +export function instanceOfControllerApiServicesV1GetAliasResponse(value: object): value is ControllerApiServicesV1GetAliasResponse { + return true; +} + +export function ControllerApiServicesV1GetAliasResponseFromJSON(json: any): ControllerApiServicesV1GetAliasResponse { + return ControllerApiServicesV1GetAliasResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetAliasResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetAliasResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesAliasesV1AliasFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetAliasResponseToJSON(json: any): ControllerApiServicesV1GetAliasResponse { + return ControllerApiServicesV1GetAliasResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetAliasResponseToJSONTyped(value?: ControllerApiServicesV1GetAliasResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesAliasesV1AliasToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetAuthMethodResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetAuthMethodResponse.ts new file mode 100644 index 000000000..e2fce4427 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetAuthMethodResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAuthmethodsV1AuthMethod } from './ControllerApiResourcesAuthmethodsV1AuthMethod'; +import { + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSONTyped, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSONTyped, +} from './ControllerApiResourcesAuthmethodsV1AuthMethod'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetAuthMethodResponse + */ +export interface ControllerApiServicesV1GetAuthMethodResponse { + /** + * + * @type {ControllerApiResourcesAuthmethodsV1AuthMethod} + * @memberof ControllerApiServicesV1GetAuthMethodResponse + */ + item?: ControllerApiResourcesAuthmethodsV1AuthMethod; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetAuthMethodResponse interface. + */ +export function instanceOfControllerApiServicesV1GetAuthMethodResponse(value: object): value is ControllerApiServicesV1GetAuthMethodResponse { + return true; +} + +export function ControllerApiServicesV1GetAuthMethodResponseFromJSON(json: any): ControllerApiServicesV1GetAuthMethodResponse { + return ControllerApiServicesV1GetAuthMethodResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetAuthMethodResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetAuthMethodResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetAuthMethodResponseToJSON(json: any): ControllerApiServicesV1GetAuthMethodResponse { + return ControllerApiServicesV1GetAuthMethodResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetAuthMethodResponseToJSONTyped(value?: ControllerApiServicesV1GetAuthMethodResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesAuthmethodsV1AuthMethodToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetAuthTokenResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetAuthTokenResponse.ts new file mode 100644 index 000000000..3e602f683 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetAuthTokenResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAuthtokensV1AuthToken } from './ControllerApiResourcesAuthtokensV1AuthToken'; +import { + ControllerApiResourcesAuthtokensV1AuthTokenFromJSON, + ControllerApiResourcesAuthtokensV1AuthTokenFromJSONTyped, + ControllerApiResourcesAuthtokensV1AuthTokenToJSON, + ControllerApiResourcesAuthtokensV1AuthTokenToJSONTyped, +} from './ControllerApiResourcesAuthtokensV1AuthToken'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetAuthTokenResponse + */ +export interface ControllerApiServicesV1GetAuthTokenResponse { + /** + * + * @type {ControllerApiResourcesAuthtokensV1AuthToken} + * @memberof ControllerApiServicesV1GetAuthTokenResponse + */ + item?: ControllerApiResourcesAuthtokensV1AuthToken; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetAuthTokenResponse interface. + */ +export function instanceOfControllerApiServicesV1GetAuthTokenResponse(value: object): value is ControllerApiServicesV1GetAuthTokenResponse { + return true; +} + +export function ControllerApiServicesV1GetAuthTokenResponseFromJSON(json: any): ControllerApiServicesV1GetAuthTokenResponse { + return ControllerApiServicesV1GetAuthTokenResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetAuthTokenResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetAuthTokenResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesAuthtokensV1AuthTokenFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetAuthTokenResponseToJSON(json: any): ControllerApiServicesV1GetAuthTokenResponse { + return ControllerApiServicesV1GetAuthTokenResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetAuthTokenResponseToJSONTyped(value?: ControllerApiServicesV1GetAuthTokenResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesAuthtokensV1AuthTokenToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialLibraryResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialLibraryResponse.ts new file mode 100644 index 000000000..6b9bda003 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialLibraryResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentiallibrariesV1CredentialLibrary } from './ControllerApiResourcesCredentiallibrariesV1CredentialLibrary'; +import { + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSONTyped, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSONTyped, +} from './ControllerApiResourcesCredentiallibrariesV1CredentialLibrary'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetCredentialLibraryResponse + */ +export interface ControllerApiServicesV1GetCredentialLibraryResponse { + /** + * + * @type {ControllerApiResourcesCredentiallibrariesV1CredentialLibrary} + * @memberof ControllerApiServicesV1GetCredentialLibraryResponse + */ + item?: ControllerApiResourcesCredentiallibrariesV1CredentialLibrary; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetCredentialLibraryResponse interface. + */ +export function instanceOfControllerApiServicesV1GetCredentialLibraryResponse(value: object): value is ControllerApiServicesV1GetCredentialLibraryResponse { + return true; +} + +export function ControllerApiServicesV1GetCredentialLibraryResponseFromJSON(json: any): ControllerApiServicesV1GetCredentialLibraryResponse { + return ControllerApiServicesV1GetCredentialLibraryResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetCredentialLibraryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetCredentialLibraryResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetCredentialLibraryResponseToJSON(json: any): ControllerApiServicesV1GetCredentialLibraryResponse { + return ControllerApiServicesV1GetCredentialLibraryResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetCredentialLibraryResponseToJSONTyped(value?: ControllerApiServicesV1GetCredentialLibraryResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialResponse.ts new file mode 100644 index 000000000..016727c1e --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentialsV1Credential } from './ControllerApiResourcesCredentialsV1Credential'; +import { + ControllerApiResourcesCredentialsV1CredentialFromJSON, + ControllerApiResourcesCredentialsV1CredentialFromJSONTyped, + ControllerApiResourcesCredentialsV1CredentialToJSON, + ControllerApiResourcesCredentialsV1CredentialToJSONTyped, +} from './ControllerApiResourcesCredentialsV1Credential'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetCredentialResponse + */ +export interface ControllerApiServicesV1GetCredentialResponse { + /** + * + * @type {ControllerApiResourcesCredentialsV1Credential} + * @memberof ControllerApiServicesV1GetCredentialResponse + */ + item?: ControllerApiResourcesCredentialsV1Credential; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetCredentialResponse interface. + */ +export function instanceOfControllerApiServicesV1GetCredentialResponse(value: object): value is ControllerApiServicesV1GetCredentialResponse { + return true; +} + +export function ControllerApiServicesV1GetCredentialResponseFromJSON(json: any): ControllerApiServicesV1GetCredentialResponse { + return ControllerApiServicesV1GetCredentialResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetCredentialResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetCredentialResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesCredentialsV1CredentialFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetCredentialResponseToJSON(json: any): ControllerApiServicesV1GetCredentialResponse { + return ControllerApiServicesV1GetCredentialResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetCredentialResponseToJSONTyped(value?: ControllerApiServicesV1GetCredentialResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesCredentialsV1CredentialToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialStoreResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialStoreResponse.ts new file mode 100644 index 000000000..bb3294648 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetCredentialStoreResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentialstoresV1CredentialStore } from './ControllerApiResourcesCredentialstoresV1CredentialStore'; +import { + ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON, + ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSONTyped, + ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON, + ControllerApiResourcesCredentialstoresV1CredentialStoreToJSONTyped, +} from './ControllerApiResourcesCredentialstoresV1CredentialStore'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetCredentialStoreResponse + */ +export interface ControllerApiServicesV1GetCredentialStoreResponse { + /** + * + * @type {ControllerApiResourcesCredentialstoresV1CredentialStore} + * @memberof ControllerApiServicesV1GetCredentialStoreResponse + */ + item?: ControllerApiResourcesCredentialstoresV1CredentialStore; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetCredentialStoreResponse interface. + */ +export function instanceOfControllerApiServicesV1GetCredentialStoreResponse(value: object): value is ControllerApiServicesV1GetCredentialStoreResponse { + return true; +} + +export function ControllerApiServicesV1GetCredentialStoreResponseFromJSON(json: any): ControllerApiServicesV1GetCredentialStoreResponse { + return ControllerApiServicesV1GetCredentialStoreResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetCredentialStoreResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetCredentialStoreResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetCredentialStoreResponseToJSON(json: any): ControllerApiServicesV1GetCredentialStoreResponse { + return ControllerApiServicesV1GetCredentialStoreResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetCredentialStoreResponseToJSONTyped(value?: ControllerApiServicesV1GetCredentialStoreResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetGroupResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetGroupResponse.ts new file mode 100644 index 000000000..9ec17644d --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetGroupResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesGroupsV1Group } from './ControllerApiResourcesGroupsV1Group'; +import { + ControllerApiResourcesGroupsV1GroupFromJSON, + ControllerApiResourcesGroupsV1GroupFromJSONTyped, + ControllerApiResourcesGroupsV1GroupToJSON, + ControllerApiResourcesGroupsV1GroupToJSONTyped, +} from './ControllerApiResourcesGroupsV1Group'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetGroupResponse + */ +export interface ControllerApiServicesV1GetGroupResponse { + /** + * + * @type {ControllerApiResourcesGroupsV1Group} + * @memberof ControllerApiServicesV1GetGroupResponse + */ + item?: ControllerApiResourcesGroupsV1Group; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetGroupResponse interface. + */ +export function instanceOfControllerApiServicesV1GetGroupResponse(value: object): value is ControllerApiServicesV1GetGroupResponse { + return true; +} + +export function ControllerApiServicesV1GetGroupResponseFromJSON(json: any): ControllerApiServicesV1GetGroupResponse { + return ControllerApiServicesV1GetGroupResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetGroupResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetGroupResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesGroupsV1GroupFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetGroupResponseToJSON(json: any): ControllerApiServicesV1GetGroupResponse { + return ControllerApiServicesV1GetGroupResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetGroupResponseToJSONTyped(value?: ControllerApiServicesV1GetGroupResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesGroupsV1GroupToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetHostCatalogResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetHostCatalogResponse.ts new file mode 100644 index 000000000..4cd3793c9 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetHostCatalogResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostcatalogsV1HostCatalog } from './ControllerApiResourcesHostcatalogsV1HostCatalog'; +import { + ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON, + ControllerApiResourcesHostcatalogsV1HostCatalogFromJSONTyped, + ControllerApiResourcesHostcatalogsV1HostCatalogToJSON, + ControllerApiResourcesHostcatalogsV1HostCatalogToJSONTyped, +} from './ControllerApiResourcesHostcatalogsV1HostCatalog'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetHostCatalogResponse + */ +export interface ControllerApiServicesV1GetHostCatalogResponse { + /** + * + * @type {ControllerApiResourcesHostcatalogsV1HostCatalog} + * @memberof ControllerApiServicesV1GetHostCatalogResponse + */ + item?: ControllerApiResourcesHostcatalogsV1HostCatalog; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetHostCatalogResponse interface. + */ +export function instanceOfControllerApiServicesV1GetHostCatalogResponse(value: object): value is ControllerApiServicesV1GetHostCatalogResponse { + return true; +} + +export function ControllerApiServicesV1GetHostCatalogResponseFromJSON(json: any): ControllerApiServicesV1GetHostCatalogResponse { + return ControllerApiServicesV1GetHostCatalogResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetHostCatalogResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetHostCatalogResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetHostCatalogResponseToJSON(json: any): ControllerApiServicesV1GetHostCatalogResponse { + return ControllerApiServicesV1GetHostCatalogResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetHostCatalogResponseToJSONTyped(value?: ControllerApiServicesV1GetHostCatalogResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesHostcatalogsV1HostCatalogToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetHostResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetHostResponse.ts new file mode 100644 index 000000000..ebaf9b154 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetHostResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsV1Host } from './ControllerApiResourcesHostsV1Host'; +import { + ControllerApiResourcesHostsV1HostFromJSON, + ControllerApiResourcesHostsV1HostFromJSONTyped, + ControllerApiResourcesHostsV1HostToJSON, + ControllerApiResourcesHostsV1HostToJSONTyped, +} from './ControllerApiResourcesHostsV1Host'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetHostResponse + */ +export interface ControllerApiServicesV1GetHostResponse { + /** + * + * @type {ControllerApiResourcesHostsV1Host} + * @memberof ControllerApiServicesV1GetHostResponse + */ + item?: ControllerApiResourcesHostsV1Host; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetHostResponse interface. + */ +export function instanceOfControllerApiServicesV1GetHostResponse(value: object): value is ControllerApiServicesV1GetHostResponse { + return true; +} + +export function ControllerApiServicesV1GetHostResponseFromJSON(json: any): ControllerApiServicesV1GetHostResponse { + return ControllerApiServicesV1GetHostResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetHostResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetHostResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostsV1HostFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetHostResponseToJSON(json: any): ControllerApiServicesV1GetHostResponse { + return ControllerApiServicesV1GetHostResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetHostResponseToJSONTyped(value?: ControllerApiServicesV1GetHostResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesHostsV1HostToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetHostSetResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetHostSetResponse.ts new file mode 100644 index 000000000..b1dc7ff0a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetHostSetResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsetsV1HostSet } from './ControllerApiResourcesHostsetsV1HostSet'; +import { + ControllerApiResourcesHostsetsV1HostSetFromJSON, + ControllerApiResourcesHostsetsV1HostSetFromJSONTyped, + ControllerApiResourcesHostsetsV1HostSetToJSON, + ControllerApiResourcesHostsetsV1HostSetToJSONTyped, +} from './ControllerApiResourcesHostsetsV1HostSet'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetHostSetResponse + */ +export interface ControllerApiServicesV1GetHostSetResponse { + /** + * + * @type {ControllerApiResourcesHostsetsV1HostSet} + * @memberof ControllerApiServicesV1GetHostSetResponse + */ + item?: ControllerApiResourcesHostsetsV1HostSet; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetHostSetResponse interface. + */ +export function instanceOfControllerApiServicesV1GetHostSetResponse(value: object): value is ControllerApiServicesV1GetHostSetResponse { + return true; +} + +export function ControllerApiServicesV1GetHostSetResponseFromJSON(json: any): ControllerApiServicesV1GetHostSetResponse { + return ControllerApiServicesV1GetHostSetResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetHostSetResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetHostSetResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostsetsV1HostSetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetHostSetResponseToJSON(json: any): ControllerApiServicesV1GetHostSetResponse { + return ControllerApiServicesV1GetHostSetResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetHostSetResponseToJSONTyped(value?: ControllerApiServicesV1GetHostSetResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesHostsetsV1HostSetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetManagedGroupResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetManagedGroupResponse.ts new file mode 100644 index 000000000..ceb284c5b --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetManagedGroupResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesManagedgroupsV1ManagedGroup } from './ControllerApiResourcesManagedgroupsV1ManagedGroup'; +import { + ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON, + ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSONTyped, + ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON, + ControllerApiResourcesManagedgroupsV1ManagedGroupToJSONTyped, +} from './ControllerApiResourcesManagedgroupsV1ManagedGroup'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetManagedGroupResponse + */ +export interface ControllerApiServicesV1GetManagedGroupResponse { + /** + * + * @type {ControllerApiResourcesManagedgroupsV1ManagedGroup} + * @memberof ControllerApiServicesV1GetManagedGroupResponse + */ + item?: ControllerApiResourcesManagedgroupsV1ManagedGroup; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetManagedGroupResponse interface. + */ +export function instanceOfControllerApiServicesV1GetManagedGroupResponse(value: object): value is ControllerApiServicesV1GetManagedGroupResponse { + return true; +} + +export function ControllerApiServicesV1GetManagedGroupResponseFromJSON(json: any): ControllerApiServicesV1GetManagedGroupResponse { + return ControllerApiServicesV1GetManagedGroupResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetManagedGroupResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetManagedGroupResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetManagedGroupResponseToJSON(json: any): ControllerApiServicesV1GetManagedGroupResponse { + return ControllerApiServicesV1GetManagedGroupResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetManagedGroupResponseToJSONTyped(value?: ControllerApiServicesV1GetManagedGroupResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetPolicyResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetPolicyResponse.ts new file mode 100644 index 000000000..d5c2e80a6 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetPolicyResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesPoliciesV1Policy } from './ControllerApiResourcesPoliciesV1Policy'; +import { + ControllerApiResourcesPoliciesV1PolicyFromJSON, + ControllerApiResourcesPoliciesV1PolicyFromJSONTyped, + ControllerApiResourcesPoliciesV1PolicyToJSON, + ControllerApiResourcesPoliciesV1PolicyToJSONTyped, +} from './ControllerApiResourcesPoliciesV1Policy'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetPolicyResponse + */ +export interface ControllerApiServicesV1GetPolicyResponse { + /** + * + * @type {ControllerApiResourcesPoliciesV1Policy} + * @memberof ControllerApiServicesV1GetPolicyResponse + */ + item?: ControllerApiResourcesPoliciesV1Policy; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetPolicyResponse interface. + */ +export function instanceOfControllerApiServicesV1GetPolicyResponse(value: object): value is ControllerApiServicesV1GetPolicyResponse { + return true; +} + +export function ControllerApiServicesV1GetPolicyResponseFromJSON(json: any): ControllerApiServicesV1GetPolicyResponse { + return ControllerApiServicesV1GetPolicyResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetPolicyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetPolicyResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesPoliciesV1PolicyFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetPolicyResponseToJSON(json: any): ControllerApiServicesV1GetPolicyResponse { + return ControllerApiServicesV1GetPolicyResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetPolicyResponseToJSONTyped(value?: ControllerApiServicesV1GetPolicyResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesPoliciesV1PolicyToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetRoleResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetRoleResponse.ts new file mode 100644 index 000000000..901d8468d --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetRoleResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetRoleResponse + */ +export interface ControllerApiServicesV1GetRoleResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1GetRoleResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetRoleResponse interface. + */ +export function instanceOfControllerApiServicesV1GetRoleResponse(value: object): value is ControllerApiServicesV1GetRoleResponse { + return true; +} + +export function ControllerApiServicesV1GetRoleResponseFromJSON(json: any): ControllerApiServicesV1GetRoleResponse { + return ControllerApiServicesV1GetRoleResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetRoleResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetRoleResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetRoleResponseToJSON(json: any): ControllerApiServicesV1GetRoleResponse { + return ControllerApiServicesV1GetRoleResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetRoleResponseToJSONTyped(value?: ControllerApiServicesV1GetRoleResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetScopeResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetScopeResponse.ts new file mode 100644 index 000000000..1bc72bcb3 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetScopeResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1Scope } from './ControllerApiResourcesScopesV1Scope'; +import { + ControllerApiResourcesScopesV1ScopeFromJSON, + ControllerApiResourcesScopesV1ScopeFromJSONTyped, + ControllerApiResourcesScopesV1ScopeToJSON, + ControllerApiResourcesScopesV1ScopeToJSONTyped, +} from './ControllerApiResourcesScopesV1Scope'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetScopeResponse + */ +export interface ControllerApiServicesV1GetScopeResponse { + /** + * + * @type {ControllerApiResourcesScopesV1Scope} + * @memberof ControllerApiServicesV1GetScopeResponse + */ + item?: ControllerApiResourcesScopesV1Scope; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetScopeResponse interface. + */ +export function instanceOfControllerApiServicesV1GetScopeResponse(value: object): value is ControllerApiServicesV1GetScopeResponse { + return true; +} + +export function ControllerApiServicesV1GetScopeResponseFromJSON(json: any): ControllerApiServicesV1GetScopeResponse { + return ControllerApiServicesV1GetScopeResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetScopeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetScopeResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesScopesV1ScopeFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetScopeResponseToJSON(json: any): ControllerApiServicesV1GetScopeResponse { + return ControllerApiServicesV1GetScopeResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetScopeResponseToJSONTyped(value?: ControllerApiServicesV1GetScopeResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesScopesV1ScopeToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetSessionRecordingResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetSessionRecordingResponse.ts new file mode 100644 index 000000000..21ed2056d --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetSessionRecordingResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionrecordingsV1SessionRecording } from './ControllerApiResourcesSessionrecordingsV1SessionRecording'; +import { + ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON, + ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSON, + ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1SessionRecording'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetSessionRecordingResponse + */ +export interface ControllerApiServicesV1GetSessionRecordingResponse { + /** + * + * @type {ControllerApiResourcesSessionrecordingsV1SessionRecording} + * @memberof ControllerApiServicesV1GetSessionRecordingResponse + */ + item?: ControllerApiResourcesSessionrecordingsV1SessionRecording; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetSessionRecordingResponse interface. + */ +export function instanceOfControllerApiServicesV1GetSessionRecordingResponse(value: object): value is ControllerApiServicesV1GetSessionRecordingResponse { + return true; +} + +export function ControllerApiServicesV1GetSessionRecordingResponseFromJSON(json: any): ControllerApiServicesV1GetSessionRecordingResponse { + return ControllerApiServicesV1GetSessionRecordingResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetSessionRecordingResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetSessionRecordingResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetSessionRecordingResponseToJSON(json: any): ControllerApiServicesV1GetSessionRecordingResponse { + return ControllerApiServicesV1GetSessionRecordingResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetSessionRecordingResponseToJSONTyped(value?: ControllerApiServicesV1GetSessionRecordingResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetSessionResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetSessionResponse.ts new file mode 100644 index 000000000..3e114568f --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetSessionResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionsV1Session } from './ControllerApiResourcesSessionsV1Session'; +import { + ControllerApiResourcesSessionsV1SessionFromJSON, + ControllerApiResourcesSessionsV1SessionFromJSONTyped, + ControllerApiResourcesSessionsV1SessionToJSON, + ControllerApiResourcesSessionsV1SessionToJSONTyped, +} from './ControllerApiResourcesSessionsV1Session'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetSessionResponse + */ +export interface ControllerApiServicesV1GetSessionResponse { + /** + * + * @type {ControllerApiResourcesSessionsV1Session} + * @memberof ControllerApiServicesV1GetSessionResponse + */ + item?: ControllerApiResourcesSessionsV1Session; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetSessionResponse interface. + */ +export function instanceOfControllerApiServicesV1GetSessionResponse(value: object): value is ControllerApiServicesV1GetSessionResponse { + return true; +} + +export function ControllerApiServicesV1GetSessionResponseFromJSON(json: any): ControllerApiServicesV1GetSessionResponse { + return ControllerApiServicesV1GetSessionResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetSessionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetSessionResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesSessionsV1SessionFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetSessionResponseToJSON(json: any): ControllerApiServicesV1GetSessionResponse { + return ControllerApiServicesV1GetSessionResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetSessionResponseToJSONTyped(value?: ControllerApiServicesV1GetSessionResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesSessionsV1SessionToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetStorageBucketResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetStorageBucketResponse.ts new file mode 100644 index 000000000..616e926ba --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetStorageBucketResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesStoragebucketsV1StorageBucket } from './ControllerApiResourcesStoragebucketsV1StorageBucket'; +import { + ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON, + ControllerApiResourcesStoragebucketsV1StorageBucketFromJSONTyped, + ControllerApiResourcesStoragebucketsV1StorageBucketToJSON, + ControllerApiResourcesStoragebucketsV1StorageBucketToJSONTyped, +} from './ControllerApiResourcesStoragebucketsV1StorageBucket'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetStorageBucketResponse + */ +export interface ControllerApiServicesV1GetStorageBucketResponse { + /** + * + * @type {ControllerApiResourcesStoragebucketsV1StorageBucket} + * @memberof ControllerApiServicesV1GetStorageBucketResponse + */ + item?: ControllerApiResourcesStoragebucketsV1StorageBucket; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetStorageBucketResponse interface. + */ +export function instanceOfControllerApiServicesV1GetStorageBucketResponse(value: object): value is ControllerApiServicesV1GetStorageBucketResponse { + return true; +} + +export function ControllerApiServicesV1GetStorageBucketResponseFromJSON(json: any): ControllerApiServicesV1GetStorageBucketResponse { + return ControllerApiServicesV1GetStorageBucketResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetStorageBucketResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetStorageBucketResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetStorageBucketResponseToJSON(json: any): ControllerApiServicesV1GetStorageBucketResponse { + return ControllerApiServicesV1GetStorageBucketResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetStorageBucketResponseToJSONTyped(value?: ControllerApiServicesV1GetStorageBucketResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesStoragebucketsV1StorageBucketToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetTargetResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetTargetResponse.ts new file mode 100644 index 000000000..3518648f8 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetTargetResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target'; +import { + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetFromJSONTyped, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiResourcesTargetsV1TargetToJSONTyped, +} from './ControllerApiResourcesTargetsV1Target'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetTargetResponse + */ +export interface ControllerApiServicesV1GetTargetResponse { + /** + * + * @type {ControllerApiResourcesTargetsV1Target} + * @memberof ControllerApiServicesV1GetTargetResponse + */ + item?: ControllerApiResourcesTargetsV1Target; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetTargetResponse interface. + */ +export function instanceOfControllerApiServicesV1GetTargetResponse(value: object): value is ControllerApiServicesV1GetTargetResponse { + return true; +} + +export function ControllerApiServicesV1GetTargetResponseFromJSON(json: any): ControllerApiServicesV1GetTargetResponse { + return ControllerApiServicesV1GetTargetResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetTargetResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetTargetResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetTargetResponseToJSON(json: any): ControllerApiServicesV1GetTargetResponse { + return ControllerApiServicesV1GetTargetResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetTargetResponseToJSONTyped(value?: ControllerApiServicesV1GetTargetResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetUserResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetUserResponse.ts new file mode 100644 index 000000000..812dce7fc --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetUserResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesUsersV1User } from './ControllerApiResourcesUsersV1User'; +import { + ControllerApiResourcesUsersV1UserFromJSON, + ControllerApiResourcesUsersV1UserFromJSONTyped, + ControllerApiResourcesUsersV1UserToJSON, + ControllerApiResourcesUsersV1UserToJSONTyped, +} from './ControllerApiResourcesUsersV1User'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetUserResponse + */ +export interface ControllerApiServicesV1GetUserResponse { + /** + * + * @type {ControllerApiResourcesUsersV1User} + * @memberof ControllerApiServicesV1GetUserResponse + */ + item?: ControllerApiResourcesUsersV1User; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetUserResponse interface. + */ +export function instanceOfControllerApiServicesV1GetUserResponse(value: object): value is ControllerApiServicesV1GetUserResponse { + return true; +} + +export function ControllerApiServicesV1GetUserResponseFromJSON(json: any): ControllerApiServicesV1GetUserResponse { + return ControllerApiServicesV1GetUserResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetUserResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetUserResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesUsersV1UserFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetUserResponseToJSON(json: any): ControllerApiServicesV1GetUserResponse { + return ControllerApiServicesV1GetUserResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetUserResponseToJSONTyped(value?: ControllerApiServicesV1GetUserResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesUsersV1UserToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GetWorkerResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GetWorkerResponse.ts new file mode 100644 index 000000000..8a966fb00 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GetWorkerResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1Worker } from './ControllerApiResourcesWorkersV1Worker'; +import { + ControllerApiResourcesWorkersV1WorkerFromJSON, + ControllerApiResourcesWorkersV1WorkerFromJSONTyped, + ControllerApiResourcesWorkersV1WorkerToJSON, + ControllerApiResourcesWorkersV1WorkerToJSONTyped, +} from './ControllerApiResourcesWorkersV1Worker'; + +/** + * + * @export + * @interface ControllerApiServicesV1GetWorkerResponse + */ +export interface ControllerApiServicesV1GetWorkerResponse { + /** + * + * @type {ControllerApiResourcesWorkersV1Worker} + * @memberof ControllerApiServicesV1GetWorkerResponse + */ + item?: ControllerApiResourcesWorkersV1Worker; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GetWorkerResponse interface. + */ +export function instanceOfControllerApiServicesV1GetWorkerResponse(value: object): value is ControllerApiServicesV1GetWorkerResponse { + return true; +} + +export function ControllerApiServicesV1GetWorkerResponseFromJSON(json: any): ControllerApiServicesV1GetWorkerResponse { + return ControllerApiServicesV1GetWorkerResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetWorkerResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GetWorkerResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesWorkersV1WorkerFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1GetWorkerResponseToJSON(json: any): ControllerApiServicesV1GetWorkerResponse { + return ControllerApiServicesV1GetWorkerResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GetWorkerResponseToJSONTyped(value?: ControllerApiServicesV1GetWorkerResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesWorkersV1WorkerToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceAddGroupMembersBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceAddGroupMembersBody.ts new file mode 100644 index 000000000..a009d89b3 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceAddGroupMembersBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1GroupServiceAddGroupMembersBody + */ +export interface ControllerApiServicesV1GroupServiceAddGroupMembersBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1GroupServiceAddGroupMembersBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1GroupServiceAddGroupMembersBody + */ + memberIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GroupServiceAddGroupMembersBody interface. + */ +export function instanceOfControllerApiServicesV1GroupServiceAddGroupMembersBody(value: object): value is ControllerApiServicesV1GroupServiceAddGroupMembersBody { + return true; +} + +export function ControllerApiServicesV1GroupServiceAddGroupMembersBodyFromJSON(json: any): ControllerApiServicesV1GroupServiceAddGroupMembersBody { + return ControllerApiServicesV1GroupServiceAddGroupMembersBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GroupServiceAddGroupMembersBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GroupServiceAddGroupMembersBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'memberIds': json['member_ids'] == null ? undefined : json['member_ids'], + }; +} + +export function ControllerApiServicesV1GroupServiceAddGroupMembersBodyToJSON(json: any): ControllerApiServicesV1GroupServiceAddGroupMembersBody { + return ControllerApiServicesV1GroupServiceAddGroupMembersBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GroupServiceAddGroupMembersBodyToJSONTyped(value?: ControllerApiServicesV1GroupServiceAddGroupMembersBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'member_ids': value['memberIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceRemoveGroupMembersBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceRemoveGroupMembersBody.ts new file mode 100644 index 000000000..cbf3870a2 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceRemoveGroupMembersBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1GroupServiceRemoveGroupMembersBody + */ +export interface ControllerApiServicesV1GroupServiceRemoveGroupMembersBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1GroupServiceRemoveGroupMembersBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1GroupServiceRemoveGroupMembersBody + */ + memberIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GroupServiceRemoveGroupMembersBody interface. + */ +export function instanceOfControllerApiServicesV1GroupServiceRemoveGroupMembersBody(value: object): value is ControllerApiServicesV1GroupServiceRemoveGroupMembersBody { + return true; +} + +export function ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyFromJSON(json: any): ControllerApiServicesV1GroupServiceRemoveGroupMembersBody { + return ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GroupServiceRemoveGroupMembersBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'memberIds': json['member_ids'] == null ? undefined : json['member_ids'], + }; +} + +export function ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyToJSON(json: any): ControllerApiServicesV1GroupServiceRemoveGroupMembersBody { + return ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyToJSONTyped(value?: ControllerApiServicesV1GroupServiceRemoveGroupMembersBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'member_ids': value['memberIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceSetGroupMembersBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceSetGroupMembersBody.ts new file mode 100644 index 000000000..131ea4281 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1GroupServiceSetGroupMembersBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1GroupServiceSetGroupMembersBody + */ +export interface ControllerApiServicesV1GroupServiceSetGroupMembersBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1GroupServiceSetGroupMembersBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1GroupServiceSetGroupMembersBody + */ + memberIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1GroupServiceSetGroupMembersBody interface. + */ +export function instanceOfControllerApiServicesV1GroupServiceSetGroupMembersBody(value: object): value is ControllerApiServicesV1GroupServiceSetGroupMembersBody { + return true; +} + +export function ControllerApiServicesV1GroupServiceSetGroupMembersBodyFromJSON(json: any): ControllerApiServicesV1GroupServiceSetGroupMembersBody { + return ControllerApiServicesV1GroupServiceSetGroupMembersBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1GroupServiceSetGroupMembersBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1GroupServiceSetGroupMembersBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'memberIds': json['member_ids'] == null ? undefined : json['member_ids'], + }; +} + +export function ControllerApiServicesV1GroupServiceSetGroupMembersBodyToJSON(json: any): ControllerApiServicesV1GroupServiceSetGroupMembersBody { + return ControllerApiServicesV1GroupServiceSetGroupMembersBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1GroupServiceSetGroupMembersBodyToJSONTyped(value?: ControllerApiServicesV1GroupServiceSetGroupMembersBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'member_ids': value['memberIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceAddHostSetHostsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceAddHostSetHostsBody.ts new file mode 100644 index 000000000..24b779601 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceAddHostSetHostsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1HostSetServiceAddHostSetHostsBody + */ +export interface ControllerApiServicesV1HostSetServiceAddHostSetHostsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1HostSetServiceAddHostSetHostsBody + */ + version?: number; + /** + * A list of Host IDs which will be added to this Host Set. Each Host referenced here must be a child of the same Host Catalog of which this Host Set is a child. + * @type {Array} + * @memberof ControllerApiServicesV1HostSetServiceAddHostSetHostsBody + */ + hostIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1HostSetServiceAddHostSetHostsBody interface. + */ +export function instanceOfControllerApiServicesV1HostSetServiceAddHostSetHostsBody(value: object): value is ControllerApiServicesV1HostSetServiceAddHostSetHostsBody { + return true; +} + +export function ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyFromJSON(json: any): ControllerApiServicesV1HostSetServiceAddHostSetHostsBody { + return ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1HostSetServiceAddHostSetHostsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'hostIds': json['host_ids'] == null ? undefined : json['host_ids'], + }; +} + +export function ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyToJSON(json: any): ControllerApiServicesV1HostSetServiceAddHostSetHostsBody { + return ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyToJSONTyped(value?: ControllerApiServicesV1HostSetServiceAddHostSetHostsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'host_ids': value['hostIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody.ts new file mode 100644 index 000000000..bca60f8d0 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody + */ +export interface ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody + */ + version?: number; + /** + * A list of Host IDs which will be removed from this Host Set. + * @type {Array} + * @memberof ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody + */ + hostIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody interface. + */ +export function instanceOfControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody(value: object): value is ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody { + return true; +} + +export function ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyFromJSON(json: any): ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody { + return ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'hostIds': json['host_ids'] == null ? undefined : json['host_ids'], + }; +} + +export function ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyToJSON(json: any): ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody { + return ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyToJSONTyped(value?: ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'host_ids': value['hostIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceSetHostSetHostsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceSetHostSetHostsBody.ts new file mode 100644 index 000000000..029402000 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1HostSetServiceSetHostSetHostsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1HostSetServiceSetHostSetHostsBody + */ +export interface ControllerApiServicesV1HostSetServiceSetHostSetHostsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1HostSetServiceSetHostSetHostsBody + */ + version?: number; + /** + * A list of Host IDs which will be set on this Host Set. Each Host referenced here must be a child of the same Host Catalog of which this Host Set is a child. + * @type {Array} + * @memberof ControllerApiServicesV1HostSetServiceSetHostSetHostsBody + */ + hostIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1HostSetServiceSetHostSetHostsBody interface. + */ +export function instanceOfControllerApiServicesV1HostSetServiceSetHostSetHostsBody(value: object): value is ControllerApiServicesV1HostSetServiceSetHostSetHostsBody { + return true; +} + +export function ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyFromJSON(json: any): ControllerApiServicesV1HostSetServiceSetHostSetHostsBody { + return ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1HostSetServiceSetHostSetHostsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'hostIds': json['host_ids'] == null ? undefined : json['host_ids'], + }; +} + +export function ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyToJSON(json: any): ControllerApiServicesV1HostSetServiceSetHostSetHostsBody { + return ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyToJSONTyped(value?: ControllerApiServicesV1HostSetServiceSetHostSetHostsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'host_ids': value['hostIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListAccountsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListAccountsResponse.ts new file mode 100644 index 000000000..1a82f09a7 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListAccountsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAccountsV1Account } from './ControllerApiResourcesAccountsV1Account'; +import { + ControllerApiResourcesAccountsV1AccountFromJSON, + ControllerApiResourcesAccountsV1AccountFromJSONTyped, + ControllerApiResourcesAccountsV1AccountToJSON, + ControllerApiResourcesAccountsV1AccountToJSONTyped, +} from './ControllerApiResourcesAccountsV1Account'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListAccountsResponse + */ +export interface ControllerApiServicesV1ListAccountsResponse { + /** + * The list of accounts. + * @type {Array} + * @memberof ControllerApiServicesV1ListAccountsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListAccountsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListAccountsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListAccountsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListAccountsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListAccountsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListAccountsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListAccountsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListAccountsResponse(value: object): value is ControllerApiServicesV1ListAccountsResponse { + return true; +} + +export function ControllerApiServicesV1ListAccountsResponseFromJSON(json: any): ControllerApiServicesV1ListAccountsResponse { + return ControllerApiServicesV1ListAccountsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListAccountsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListAccountsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesAccountsV1AccountFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListAccountsResponseToJSON(json: any): ControllerApiServicesV1ListAccountsResponse { + return ControllerApiServicesV1ListAccountsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListAccountsResponseToJSONTyped(value?: ControllerApiServicesV1ListAccountsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesAccountsV1AccountToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListAliasesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListAliasesResponse.ts new file mode 100644 index 000000000..70fc5d20d --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListAliasesResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAliasesV1Alias } from './ControllerApiResourcesAliasesV1Alias'; +import { + ControllerApiResourcesAliasesV1AliasFromJSON, + ControllerApiResourcesAliasesV1AliasFromJSONTyped, + ControllerApiResourcesAliasesV1AliasToJSON, + ControllerApiResourcesAliasesV1AliasToJSONTyped, +} from './ControllerApiResourcesAliasesV1Alias'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListAliasesResponse + */ +export interface ControllerApiServicesV1ListAliasesResponse { + /** + * The list of aliases. + * @type {Array} + * @memberof ControllerApiServicesV1ListAliasesResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListAliasesResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListAliasesResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListAliasesResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListAliasesResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListAliasesResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListAliasesResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListAliasesResponse interface. + */ +export function instanceOfControllerApiServicesV1ListAliasesResponse(value: object): value is ControllerApiServicesV1ListAliasesResponse { + return true; +} + +export function ControllerApiServicesV1ListAliasesResponseFromJSON(json: any): ControllerApiServicesV1ListAliasesResponse { + return ControllerApiServicesV1ListAliasesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListAliasesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListAliasesResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesAliasesV1AliasFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListAliasesResponseToJSON(json: any): ControllerApiServicesV1ListAliasesResponse { + return ControllerApiServicesV1ListAliasesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListAliasesResponseToJSONTyped(value?: ControllerApiServicesV1ListAliasesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesAliasesV1AliasToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListAuthMethodsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListAuthMethodsResponse.ts new file mode 100644 index 000000000..725664b35 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListAuthMethodsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAuthmethodsV1AuthMethod } from './ControllerApiResourcesAuthmethodsV1AuthMethod'; +import { + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSONTyped, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSONTyped, +} from './ControllerApiResourcesAuthmethodsV1AuthMethod'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListAuthMethodsResponse + */ +export interface ControllerApiServicesV1ListAuthMethodsResponse { + /** + * The items returned in this page. + * @type {Array} + * @memberof ControllerApiServicesV1ListAuthMethodsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListAuthMethodsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListAuthMethodsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListAuthMethodsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListAuthMethodsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListAuthMethodsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListAuthMethodsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListAuthMethodsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListAuthMethodsResponse(value: object): value is ControllerApiServicesV1ListAuthMethodsResponse { + return true; +} + +export function ControllerApiServicesV1ListAuthMethodsResponseFromJSON(json: any): ControllerApiServicesV1ListAuthMethodsResponse { + return ControllerApiServicesV1ListAuthMethodsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListAuthMethodsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListAuthMethodsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListAuthMethodsResponseToJSON(json: any): ControllerApiServicesV1ListAuthMethodsResponse { + return ControllerApiServicesV1ListAuthMethodsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListAuthMethodsResponseToJSONTyped(value?: ControllerApiServicesV1ListAuthMethodsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesAuthmethodsV1AuthMethodToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListAuthTokensResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListAuthTokensResponse.ts new file mode 100644 index 000000000..371e24513 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListAuthTokensResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAuthtokensV1AuthToken } from './ControllerApiResourcesAuthtokensV1AuthToken'; +import { + ControllerApiResourcesAuthtokensV1AuthTokenFromJSON, + ControllerApiResourcesAuthtokensV1AuthTokenFromJSONTyped, + ControllerApiResourcesAuthtokensV1AuthTokenToJSON, + ControllerApiResourcesAuthtokensV1AuthTokenToJSONTyped, +} from './ControllerApiResourcesAuthtokensV1AuthToken'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListAuthTokensResponse + */ +export interface ControllerApiServicesV1ListAuthTokensResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListAuthTokensResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListAuthTokensResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListAuthTokensResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListAuthTokensResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListAuthTokensResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListAuthTokensResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListAuthTokensResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListAuthTokensResponse interface. + */ +export function instanceOfControllerApiServicesV1ListAuthTokensResponse(value: object): value is ControllerApiServicesV1ListAuthTokensResponse { + return true; +} + +export function ControllerApiServicesV1ListAuthTokensResponseFromJSON(json: any): ControllerApiServicesV1ListAuthTokensResponse { + return ControllerApiServicesV1ListAuthTokensResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListAuthTokensResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListAuthTokensResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesAuthtokensV1AuthTokenFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListAuthTokensResponseToJSON(json: any): ControllerApiServicesV1ListAuthTokensResponse { + return ControllerApiServicesV1ListAuthTokensResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListAuthTokensResponseToJSONTyped(value?: ControllerApiServicesV1ListAuthTokensResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesAuthtokensV1AuthTokenToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialLibrariesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialLibrariesResponse.ts new file mode 100644 index 000000000..e81083efb --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialLibrariesResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentiallibrariesV1CredentialLibrary } from './ControllerApiResourcesCredentiallibrariesV1CredentialLibrary'; +import { + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSONTyped, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSONTyped, +} from './ControllerApiResourcesCredentiallibrariesV1CredentialLibrary'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListCredentialLibrariesResponse + */ +export interface ControllerApiServicesV1ListCredentialLibrariesResponse { + /** + * The items returned in this page. + * @type {Array} + * @memberof ControllerApiServicesV1ListCredentialLibrariesResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialLibrariesResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialLibrariesResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialLibrariesResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialLibrariesResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListCredentialLibrariesResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListCredentialLibrariesResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListCredentialLibrariesResponse interface. + */ +export function instanceOfControllerApiServicesV1ListCredentialLibrariesResponse(value: object): value is ControllerApiServicesV1ListCredentialLibrariesResponse { + return true; +} + +export function ControllerApiServicesV1ListCredentialLibrariesResponseFromJSON(json: any): ControllerApiServicesV1ListCredentialLibrariesResponse { + return ControllerApiServicesV1ListCredentialLibrariesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListCredentialLibrariesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListCredentialLibrariesResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListCredentialLibrariesResponseToJSON(json: any): ControllerApiServicesV1ListCredentialLibrariesResponse { + return ControllerApiServicesV1ListCredentialLibrariesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListCredentialLibrariesResponseToJSONTyped(value?: ControllerApiServicesV1ListCredentialLibrariesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialStoresResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialStoresResponse.ts new file mode 100644 index 000000000..04c8a1315 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialStoresResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentialstoresV1CredentialStore } from './ControllerApiResourcesCredentialstoresV1CredentialStore'; +import { + ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON, + ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSONTyped, + ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON, + ControllerApiResourcesCredentialstoresV1CredentialStoreToJSONTyped, +} from './ControllerApiResourcesCredentialstoresV1CredentialStore'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListCredentialStoresResponse + */ +export interface ControllerApiServicesV1ListCredentialStoresResponse { + /** + * The items returned in this page. + * @type {Array} + * @memberof ControllerApiServicesV1ListCredentialStoresResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialStoresResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialStoresResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialStoresResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialStoresResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListCredentialStoresResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListCredentialStoresResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListCredentialStoresResponse interface. + */ +export function instanceOfControllerApiServicesV1ListCredentialStoresResponse(value: object): value is ControllerApiServicesV1ListCredentialStoresResponse { + return true; +} + +export function ControllerApiServicesV1ListCredentialStoresResponseFromJSON(json: any): ControllerApiServicesV1ListCredentialStoresResponse { + return ControllerApiServicesV1ListCredentialStoresResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListCredentialStoresResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListCredentialStoresResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListCredentialStoresResponseToJSON(json: any): ControllerApiServicesV1ListCredentialStoresResponse { + return ControllerApiServicesV1ListCredentialStoresResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListCredentialStoresResponseToJSONTyped(value?: ControllerApiServicesV1ListCredentialStoresResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialsResponse.ts new file mode 100644 index 000000000..34ae92ee4 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListCredentialsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentialsV1Credential } from './ControllerApiResourcesCredentialsV1Credential'; +import { + ControllerApiResourcesCredentialsV1CredentialFromJSON, + ControllerApiResourcesCredentialsV1CredentialFromJSONTyped, + ControllerApiResourcesCredentialsV1CredentialToJSON, + ControllerApiResourcesCredentialsV1CredentialToJSONTyped, +} from './ControllerApiResourcesCredentialsV1Credential'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListCredentialsResponse + */ +export interface ControllerApiServicesV1ListCredentialsResponse { + /** + * The items returned in this page. + * @type {Array} + * @memberof ControllerApiServicesV1ListCredentialsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListCredentialsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListCredentialsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListCredentialsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListCredentialsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListCredentialsResponse(value: object): value is ControllerApiServicesV1ListCredentialsResponse { + return true; +} + +export function ControllerApiServicesV1ListCredentialsResponseFromJSON(json: any): ControllerApiServicesV1ListCredentialsResponse { + return ControllerApiServicesV1ListCredentialsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListCredentialsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListCredentialsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesCredentialsV1CredentialFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListCredentialsResponseToJSON(json: any): ControllerApiServicesV1ListCredentialsResponse { + return ControllerApiServicesV1ListCredentialsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListCredentialsResponseToJSONTyped(value?: ControllerApiServicesV1ListCredentialsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesCredentialsV1CredentialToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListGroupsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListGroupsResponse.ts new file mode 100644 index 000000000..e507e4399 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListGroupsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesGroupsV1Group } from './ControllerApiResourcesGroupsV1Group'; +import { + ControllerApiResourcesGroupsV1GroupFromJSON, + ControllerApiResourcesGroupsV1GroupFromJSONTyped, + ControllerApiResourcesGroupsV1GroupToJSON, + ControllerApiResourcesGroupsV1GroupToJSONTyped, +} from './ControllerApiResourcesGroupsV1Group'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListGroupsResponse + */ +export interface ControllerApiServicesV1ListGroupsResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListGroupsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListGroupsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListGroupsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListGroupsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListGroupsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListGroupsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListGroupsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListGroupsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListGroupsResponse(value: object): value is ControllerApiServicesV1ListGroupsResponse { + return true; +} + +export function ControllerApiServicesV1ListGroupsResponseFromJSON(json: any): ControllerApiServicesV1ListGroupsResponse { + return ControllerApiServicesV1ListGroupsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListGroupsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListGroupsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesGroupsV1GroupFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListGroupsResponseToJSON(json: any): ControllerApiServicesV1ListGroupsResponse { + return ControllerApiServicesV1ListGroupsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListGroupsResponseToJSONTyped(value?: ControllerApiServicesV1ListGroupsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesGroupsV1GroupToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListHostCatalogsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListHostCatalogsResponse.ts new file mode 100644 index 000000000..ebfd92277 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListHostCatalogsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostcatalogsV1HostCatalog } from './ControllerApiResourcesHostcatalogsV1HostCatalog'; +import { + ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON, + ControllerApiResourcesHostcatalogsV1HostCatalogFromJSONTyped, + ControllerApiResourcesHostcatalogsV1HostCatalogToJSON, + ControllerApiResourcesHostcatalogsV1HostCatalogToJSONTyped, +} from './ControllerApiResourcesHostcatalogsV1HostCatalog'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListHostCatalogsResponse + */ +export interface ControllerApiServicesV1ListHostCatalogsResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListHostCatalogsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListHostCatalogsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListHostCatalogsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListHostCatalogsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListHostCatalogsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListHostCatalogsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListHostCatalogsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListHostCatalogsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListHostCatalogsResponse(value: object): value is ControllerApiServicesV1ListHostCatalogsResponse { + return true; +} + +export function ControllerApiServicesV1ListHostCatalogsResponseFromJSON(json: any): ControllerApiServicesV1ListHostCatalogsResponse { + return ControllerApiServicesV1ListHostCatalogsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListHostCatalogsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListHostCatalogsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListHostCatalogsResponseToJSON(json: any): ControllerApiServicesV1ListHostCatalogsResponse { + return ControllerApiServicesV1ListHostCatalogsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListHostCatalogsResponseToJSONTyped(value?: ControllerApiServicesV1ListHostCatalogsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesHostcatalogsV1HostCatalogToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListHostSetsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListHostSetsResponse.ts new file mode 100644 index 000000000..508a74ce0 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListHostSetsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsetsV1HostSet } from './ControllerApiResourcesHostsetsV1HostSet'; +import { + ControllerApiResourcesHostsetsV1HostSetFromJSON, + ControllerApiResourcesHostsetsV1HostSetFromJSONTyped, + ControllerApiResourcesHostsetsV1HostSetToJSON, + ControllerApiResourcesHostsetsV1HostSetToJSONTyped, +} from './ControllerApiResourcesHostsetsV1HostSet'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListHostSetsResponse + */ +export interface ControllerApiServicesV1ListHostSetsResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListHostSetsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListHostSetsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListHostSetsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListHostSetsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListHostSetsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListHostSetsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListHostSetsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListHostSetsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListHostSetsResponse(value: object): value is ControllerApiServicesV1ListHostSetsResponse { + return true; +} + +export function ControllerApiServicesV1ListHostSetsResponseFromJSON(json: any): ControllerApiServicesV1ListHostSetsResponse { + return ControllerApiServicesV1ListHostSetsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListHostSetsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListHostSetsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesHostsetsV1HostSetFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListHostSetsResponseToJSON(json: any): ControllerApiServicesV1ListHostSetsResponse { + return ControllerApiServicesV1ListHostSetsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListHostSetsResponseToJSONTyped(value?: ControllerApiServicesV1ListHostSetsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesHostsetsV1HostSetToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListHostsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListHostsResponse.ts new file mode 100644 index 000000000..7bc0cf0eb --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListHostsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsV1Host } from './ControllerApiResourcesHostsV1Host'; +import { + ControllerApiResourcesHostsV1HostFromJSON, + ControllerApiResourcesHostsV1HostFromJSONTyped, + ControllerApiResourcesHostsV1HostToJSON, + ControllerApiResourcesHostsV1HostToJSONTyped, +} from './ControllerApiResourcesHostsV1Host'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListHostsResponse + */ +export interface ControllerApiServicesV1ListHostsResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListHostsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListHostsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListHostsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListHostsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListHostsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListHostsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListHostsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListHostsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListHostsResponse(value: object): value is ControllerApiServicesV1ListHostsResponse { + return true; +} + +export function ControllerApiServicesV1ListHostsResponseFromJSON(json: any): ControllerApiServicesV1ListHostsResponse { + return ControllerApiServicesV1ListHostsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListHostsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListHostsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesHostsV1HostFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListHostsResponseToJSON(json: any): ControllerApiServicesV1ListHostsResponse { + return ControllerApiServicesV1ListHostsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListHostsResponseToJSONTyped(value?: ControllerApiServicesV1ListHostsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesHostsV1HostToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListKeyVersionDestructionJobsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListKeyVersionDestructionJobsResponse.ts new file mode 100644 index 000000000..291066cce --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListKeyVersionDestructionJobsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1KeyVersionDestructionJob } from './ControllerApiResourcesScopesV1KeyVersionDestructionJob'; +import { + ControllerApiResourcesScopesV1KeyVersionDestructionJobFromJSON, + ControllerApiResourcesScopesV1KeyVersionDestructionJobFromJSONTyped, + ControllerApiResourcesScopesV1KeyVersionDestructionJobToJSON, + ControllerApiResourcesScopesV1KeyVersionDestructionJobToJSONTyped, +} from './ControllerApiResourcesScopesV1KeyVersionDestructionJob'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListKeyVersionDestructionJobsResponse + */ +export interface ControllerApiServicesV1ListKeyVersionDestructionJobsResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListKeyVersionDestructionJobsResponse + */ + items?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListKeyVersionDestructionJobsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListKeyVersionDestructionJobsResponse(value: object): value is ControllerApiServicesV1ListKeyVersionDestructionJobsResponse { + return true; +} + +export function ControllerApiServicesV1ListKeyVersionDestructionJobsResponseFromJSON(json: any): ControllerApiServicesV1ListKeyVersionDestructionJobsResponse { + return ControllerApiServicesV1ListKeyVersionDestructionJobsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListKeyVersionDestructionJobsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListKeyVersionDestructionJobsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesScopesV1KeyVersionDestructionJobFromJSON)), + }; +} + +export function ControllerApiServicesV1ListKeyVersionDestructionJobsResponseToJSON(json: any): ControllerApiServicesV1ListKeyVersionDestructionJobsResponse { + return ControllerApiServicesV1ListKeyVersionDestructionJobsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListKeyVersionDestructionJobsResponseToJSONTyped(value?: ControllerApiServicesV1ListKeyVersionDestructionJobsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesScopesV1KeyVersionDestructionJobToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListKeysResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListKeysResponse.ts new file mode 100644 index 000000000..726fa79a6 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListKeysResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1Key } from './ControllerApiResourcesScopesV1Key'; +import { + ControllerApiResourcesScopesV1KeyFromJSON, + ControllerApiResourcesScopesV1KeyFromJSONTyped, + ControllerApiResourcesScopesV1KeyToJSON, + ControllerApiResourcesScopesV1KeyToJSONTyped, +} from './ControllerApiResourcesScopesV1Key'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListKeysResponse + */ +export interface ControllerApiServicesV1ListKeysResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListKeysResponse + */ + items?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListKeysResponse interface. + */ +export function instanceOfControllerApiServicesV1ListKeysResponse(value: object): value is ControllerApiServicesV1ListKeysResponse { + return true; +} + +export function ControllerApiServicesV1ListKeysResponseFromJSON(json: any): ControllerApiServicesV1ListKeysResponse { + return ControllerApiServicesV1ListKeysResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListKeysResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListKeysResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesScopesV1KeyFromJSON)), + }; +} + +export function ControllerApiServicesV1ListKeysResponseToJSON(json: any): ControllerApiServicesV1ListKeysResponse { + return ControllerApiServicesV1ListKeysResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListKeysResponseToJSONTyped(value?: ControllerApiServicesV1ListKeysResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesScopesV1KeyToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListManagedGroupsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListManagedGroupsResponse.ts new file mode 100644 index 000000000..124e0ccca --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListManagedGroupsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesManagedgroupsV1ManagedGroup } from './ControllerApiResourcesManagedgroupsV1ManagedGroup'; +import { + ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON, + ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSONTyped, + ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON, + ControllerApiResourcesManagedgroupsV1ManagedGroupToJSONTyped, +} from './ControllerApiResourcesManagedgroupsV1ManagedGroup'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListManagedGroupsResponse + */ +export interface ControllerApiServicesV1ListManagedGroupsResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListManagedGroupsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListManagedGroupsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListManagedGroupsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListManagedGroupsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListManagedGroupsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListManagedGroupsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListManagedGroupsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListManagedGroupsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListManagedGroupsResponse(value: object): value is ControllerApiServicesV1ListManagedGroupsResponse { + return true; +} + +export function ControllerApiServicesV1ListManagedGroupsResponseFromJSON(json: any): ControllerApiServicesV1ListManagedGroupsResponse { + return ControllerApiServicesV1ListManagedGroupsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListManagedGroupsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListManagedGroupsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListManagedGroupsResponseToJSON(json: any): ControllerApiServicesV1ListManagedGroupsResponse { + return ControllerApiServicesV1ListManagedGroupsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListManagedGroupsResponseToJSONTyped(value?: ControllerApiServicesV1ListManagedGroupsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListPoliciesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListPoliciesResponse.ts new file mode 100644 index 000000000..285da7afa --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListPoliciesResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesPoliciesV1Policy } from './ControllerApiResourcesPoliciesV1Policy'; +import { + ControllerApiResourcesPoliciesV1PolicyFromJSON, + ControllerApiResourcesPoliciesV1PolicyFromJSONTyped, + ControllerApiResourcesPoliciesV1PolicyToJSON, + ControllerApiResourcesPoliciesV1PolicyToJSONTyped, +} from './ControllerApiResourcesPoliciesV1Policy'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListPoliciesResponse + */ +export interface ControllerApiServicesV1ListPoliciesResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListPoliciesResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListPoliciesResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListPoliciesResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListPoliciesResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListPoliciesResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListPoliciesResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListPoliciesResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListPoliciesResponse interface. + */ +export function instanceOfControllerApiServicesV1ListPoliciesResponse(value: object): value is ControllerApiServicesV1ListPoliciesResponse { + return true; +} + +export function ControllerApiServicesV1ListPoliciesResponseFromJSON(json: any): ControllerApiServicesV1ListPoliciesResponse { + return ControllerApiServicesV1ListPoliciesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListPoliciesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListPoliciesResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesPoliciesV1PolicyFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListPoliciesResponseToJSON(json: any): ControllerApiServicesV1ListPoliciesResponse { + return ControllerApiServicesV1ListPoliciesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListPoliciesResponseToJSONTyped(value?: ControllerApiServicesV1ListPoliciesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesPoliciesV1PolicyToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListResolvableAliasesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListResolvableAliasesResponse.ts new file mode 100644 index 000000000..751218bba --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListResolvableAliasesResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAliasesV1Alias } from './ControllerApiResourcesAliasesV1Alias'; +import { + ControllerApiResourcesAliasesV1AliasFromJSON, + ControllerApiResourcesAliasesV1AliasFromJSONTyped, + ControllerApiResourcesAliasesV1AliasToJSON, + ControllerApiResourcesAliasesV1AliasToJSONTyped, +} from './ControllerApiResourcesAliasesV1Alias'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListResolvableAliasesResponse + */ +export interface ControllerApiServicesV1ListResolvableAliasesResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListResolvableAliasesResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListResolvableAliasesResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListResolvableAliasesResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListResolvableAliasesResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListResolvableAliasesResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. This includes aliases which have their + * destination_id removed or set to a resource for which the requester doesn't + * have permissions. + * @type {Array} + * @memberof ControllerApiServicesV1ListResolvableAliasesResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListResolvableAliasesResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListResolvableAliasesResponse interface. + */ +export function instanceOfControllerApiServicesV1ListResolvableAliasesResponse(value: object): value is ControllerApiServicesV1ListResolvableAliasesResponse { + return true; +} + +export function ControllerApiServicesV1ListResolvableAliasesResponseFromJSON(json: any): ControllerApiServicesV1ListResolvableAliasesResponse { + return ControllerApiServicesV1ListResolvableAliasesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListResolvableAliasesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListResolvableAliasesResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesAliasesV1AliasFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListResolvableAliasesResponseToJSON(json: any): ControllerApiServicesV1ListResolvableAliasesResponse { + return ControllerApiServicesV1ListResolvableAliasesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListResolvableAliasesResponseToJSONTyped(value?: ControllerApiServicesV1ListResolvableAliasesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesAliasesV1AliasToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListRolesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListRolesResponse.ts new file mode 100644 index 000000000..e6ba8e4a6 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListRolesResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListRolesResponse + */ +export interface ControllerApiServicesV1ListRolesResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListRolesResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListRolesResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListRolesResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListRolesResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListRolesResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListRolesResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListRolesResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListRolesResponse interface. + */ +export function instanceOfControllerApiServicesV1ListRolesResponse(value: object): value is ControllerApiServicesV1ListRolesResponse { + return true; +} + +export function ControllerApiServicesV1ListRolesResponseFromJSON(json: any): ControllerApiServicesV1ListRolesResponse { + return ControllerApiServicesV1ListRolesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListRolesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListRolesResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesRolesV1RoleFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListRolesResponseToJSON(json: any): ControllerApiServicesV1ListRolesResponse { + return ControllerApiServicesV1ListRolesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListRolesResponseToJSONTyped(value?: ControllerApiServicesV1ListRolesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesRolesV1RoleToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListScopesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListScopesResponse.ts new file mode 100644 index 000000000..a51c91947 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListScopesResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1Scope } from './ControllerApiResourcesScopesV1Scope'; +import { + ControllerApiResourcesScopesV1ScopeFromJSON, + ControllerApiResourcesScopesV1ScopeFromJSONTyped, + ControllerApiResourcesScopesV1ScopeToJSON, + ControllerApiResourcesScopesV1ScopeToJSONTyped, +} from './ControllerApiResourcesScopesV1Scope'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListScopesResponse + */ +export interface ControllerApiServicesV1ListScopesResponse { + /** + * The items returned in this page. + * @type {Array} + * @memberof ControllerApiServicesV1ListScopesResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListScopesResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListScopesResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListScopesResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListScopesResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of an pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListScopesResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListScopesResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListScopesResponse interface. + */ +export function instanceOfControllerApiServicesV1ListScopesResponse(value: object): value is ControllerApiServicesV1ListScopesResponse { + return true; +} + +export function ControllerApiServicesV1ListScopesResponseFromJSON(json: any): ControllerApiServicesV1ListScopesResponse { + return ControllerApiServicesV1ListScopesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListScopesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListScopesResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesScopesV1ScopeFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListScopesResponseToJSON(json: any): ControllerApiServicesV1ListScopesResponse { + return ControllerApiServicesV1ListScopesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListScopesResponseToJSONTyped(value?: ControllerApiServicesV1ListScopesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesScopesV1ScopeToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListSessionRecordingsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListSessionRecordingsResponse.ts new file mode 100644 index 000000000..c6dde6b6e --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListSessionRecordingsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionrecordingsV1SessionRecording } from './ControllerApiResourcesSessionrecordingsV1SessionRecording'; +import { + ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON, + ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSON, + ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1SessionRecording'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListSessionRecordingsResponse + */ +export interface ControllerApiServicesV1ListSessionRecordingsResponse { + /** + * The items returned in this page. + * @type {Array} + * @memberof ControllerApiServicesV1ListSessionRecordingsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListSessionRecordingsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListSessionRecordingsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListSessionRecordingsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListSessionRecordingsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListSessionRecordingsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListSessionRecordingsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListSessionRecordingsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListSessionRecordingsResponse(value: object): value is ControllerApiServicesV1ListSessionRecordingsResponse { + return true; +} + +export function ControllerApiServicesV1ListSessionRecordingsResponseFromJSON(json: any): ControllerApiServicesV1ListSessionRecordingsResponse { + return ControllerApiServicesV1ListSessionRecordingsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListSessionRecordingsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListSessionRecordingsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListSessionRecordingsResponseToJSON(json: any): ControllerApiServicesV1ListSessionRecordingsResponse { + return ControllerApiServicesV1ListSessionRecordingsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListSessionRecordingsResponseToJSONTyped(value?: ControllerApiServicesV1ListSessionRecordingsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListSessionsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListSessionsResponse.ts new file mode 100644 index 000000000..d03988738 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListSessionsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionsV1Session } from './ControllerApiResourcesSessionsV1Session'; +import { + ControllerApiResourcesSessionsV1SessionFromJSON, + ControllerApiResourcesSessionsV1SessionFromJSONTyped, + ControllerApiResourcesSessionsV1SessionToJSON, + ControllerApiResourcesSessionsV1SessionToJSONTyped, +} from './ControllerApiResourcesSessionsV1Session'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListSessionsResponse + */ +export interface ControllerApiServicesV1ListSessionsResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListSessionsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListSessionsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListSessionsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListSessionsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListSessionsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListSessionsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListSessionsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListSessionsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListSessionsResponse(value: object): value is ControllerApiServicesV1ListSessionsResponse { + return true; +} + +export function ControllerApiServicesV1ListSessionsResponseFromJSON(json: any): ControllerApiServicesV1ListSessionsResponse { + return ControllerApiServicesV1ListSessionsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListSessionsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListSessionsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesSessionsV1SessionFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListSessionsResponseToJSON(json: any): ControllerApiServicesV1ListSessionsResponse { + return ControllerApiServicesV1ListSessionsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListSessionsResponseToJSONTyped(value?: ControllerApiServicesV1ListSessionsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesSessionsV1SessionToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListStorageBucketsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListStorageBucketsResponse.ts new file mode 100644 index 000000000..a7e1d7983 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListStorageBucketsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesStoragebucketsV1StorageBucket } from './ControllerApiResourcesStoragebucketsV1StorageBucket'; +import { + ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON, + ControllerApiResourcesStoragebucketsV1StorageBucketFromJSONTyped, + ControllerApiResourcesStoragebucketsV1StorageBucketToJSON, + ControllerApiResourcesStoragebucketsV1StorageBucketToJSONTyped, +} from './ControllerApiResourcesStoragebucketsV1StorageBucket'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListStorageBucketsResponse + */ +export interface ControllerApiServicesV1ListStorageBucketsResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListStorageBucketsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListStorageBucketsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListStorageBucketsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListStorageBucketsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListStorageBucketsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListStorageBucketsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListStorageBucketsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListStorageBucketsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListStorageBucketsResponse(value: object): value is ControllerApiServicesV1ListStorageBucketsResponse { + return true; +} + +export function ControllerApiServicesV1ListStorageBucketsResponseFromJSON(json: any): ControllerApiServicesV1ListStorageBucketsResponse { + return ControllerApiServicesV1ListStorageBucketsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListStorageBucketsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListStorageBucketsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListStorageBucketsResponseToJSON(json: any): ControllerApiServicesV1ListStorageBucketsResponse { + return ControllerApiServicesV1ListStorageBucketsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListStorageBucketsResponseToJSONTyped(value?: ControllerApiServicesV1ListStorageBucketsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesStoragebucketsV1StorageBucketToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListTargetsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListTargetsResponse.ts new file mode 100644 index 000000000..65b741047 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListTargetsResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target'; +import { + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetFromJSONTyped, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiResourcesTargetsV1TargetToJSONTyped, +} from './ControllerApiResourcesTargetsV1Target'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListTargetsResponse + */ +export interface ControllerApiServicesV1ListTargetsResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListTargetsResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListTargetsResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListTargetsResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListTargetsResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListTargetsResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListTargetsResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListTargetsResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListTargetsResponse interface. + */ +export function instanceOfControllerApiServicesV1ListTargetsResponse(value: object): value is ControllerApiServicesV1ListTargetsResponse { + return true; +} + +export function ControllerApiServicesV1ListTargetsResponseFromJSON(json: any): ControllerApiServicesV1ListTargetsResponse { + return ControllerApiServicesV1ListTargetsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListTargetsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListTargetsResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesTargetsV1TargetFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListTargetsResponseToJSON(json: any): ControllerApiServicesV1ListTargetsResponse { + return ControllerApiServicesV1ListTargetsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListTargetsResponseToJSONTyped(value?: ControllerApiServicesV1ListTargetsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesTargetsV1TargetToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListUsersResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListUsersResponse.ts new file mode 100644 index 000000000..de352e5e9 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListUsersResponse.ts @@ -0,0 +1,129 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesUsersV1User } from './ControllerApiResourcesUsersV1User'; +import { + ControllerApiResourcesUsersV1UserFromJSON, + ControllerApiResourcesUsersV1UserFromJSONTyped, + ControllerApiResourcesUsersV1UserToJSON, + ControllerApiResourcesUsersV1UserToJSONTyped, +} from './ControllerApiResourcesUsersV1User'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListUsersResponse + */ +export interface ControllerApiServicesV1ListUsersResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListUsersResponse + */ + items?: Array; + /** + * The type of response, either "delta" or "complete". + * Delta signifies that this is part of a paginated result + * or an update to a previously completed pagination. + * Complete signifies that it is the last page. + * @type {string} + * @memberof ControllerApiServicesV1ListUsersResponse + */ + responseType?: string; + /** + * An opaque token used to continue an existing pagination or + * request updated items. Use this token in the next list request + * to request the next page. + * @type {string} + * @memberof ControllerApiServicesV1ListUsersResponse + */ + listToken?: string; + /** + * The name of the field which the items are sorted by. + * @type {string} + * @memberof ControllerApiServicesV1ListUsersResponse + */ + sortBy?: string; + /** + * The direction of the sort, either "asc" or "desc". + * @type {string} + * @memberof ControllerApiServicesV1ListUsersResponse + */ + sortDir?: string; + /** + * A list of item IDs that have been removed since they were returned + * as part of a pagination. They should be dropped from any client cache. + * This may contain items that are not known to the cache, if they were + * created and deleted between listings. + * @type {Array} + * @memberof ControllerApiServicesV1ListUsersResponse + */ + removedIds?: Array; + /** + * An estimate at the total items available. This may change during pagination. + * @type {number} + * @memberof ControllerApiServicesV1ListUsersResponse + */ + estItemCount?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListUsersResponse interface. + */ +export function instanceOfControllerApiServicesV1ListUsersResponse(value: object): value is ControllerApiServicesV1ListUsersResponse { + return true; +} + +export function ControllerApiServicesV1ListUsersResponseFromJSON(json: any): ControllerApiServicesV1ListUsersResponse { + return ControllerApiServicesV1ListUsersResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListUsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListUsersResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesUsersV1UserFromJSON)), + 'responseType': json['response_type'] == null ? undefined : json['response_type'], + 'listToken': json['list_token'] == null ? undefined : json['list_token'], + 'sortBy': json['sort_by'] == null ? undefined : json['sort_by'], + 'sortDir': json['sort_dir'] == null ? undefined : json['sort_dir'], + 'removedIds': json['removed_ids'] == null ? undefined : json['removed_ids'], + 'estItemCount': json['est_item_count'] == null ? undefined : json['est_item_count'], + }; +} + +export function ControllerApiServicesV1ListUsersResponseToJSON(json: any): ControllerApiServicesV1ListUsersResponse { + return ControllerApiServicesV1ListUsersResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListUsersResponseToJSONTyped(value?: ControllerApiServicesV1ListUsersResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesUsersV1UserToJSON)), + 'response_type': value['responseType'], + 'list_token': value['listToken'], + 'sort_by': value['sortBy'], + 'sort_dir': value['sortDir'], + 'removed_ids': value['removedIds'], + 'est_item_count': value['estItemCount'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ListWorkersResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ListWorkersResponse.ts new file mode 100644 index 000000000..39ce7c41c --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ListWorkersResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1Worker } from './ControllerApiResourcesWorkersV1Worker'; +import { + ControllerApiResourcesWorkersV1WorkerFromJSON, + ControllerApiResourcesWorkersV1WorkerFromJSONTyped, + ControllerApiResourcesWorkersV1WorkerToJSON, + ControllerApiResourcesWorkersV1WorkerToJSONTyped, +} from './ControllerApiResourcesWorkersV1Worker'; + +/** + * + * @export + * @interface ControllerApiServicesV1ListWorkersResponse + */ +export interface ControllerApiServicesV1ListWorkersResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1ListWorkersResponse + */ + items?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ListWorkersResponse interface. + */ +export function instanceOfControllerApiServicesV1ListWorkersResponse(value: object): value is ControllerApiServicesV1ListWorkersResponse { + return true; +} + +export function ControllerApiServicesV1ListWorkersResponseFromJSON(json: any): ControllerApiServicesV1ListWorkersResponse { + return ControllerApiServicesV1ListWorkersResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListWorkersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ListWorkersResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesWorkersV1WorkerFromJSON)), + }; +} + +export function ControllerApiServicesV1ListWorkersResponseToJSON(json: any): ControllerApiServicesV1ListWorkersResponse { + return ControllerApiServicesV1ListWorkersResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ListWorkersResponseToJSONTyped(value?: ControllerApiServicesV1ListWorkersResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesWorkersV1WorkerToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1MonthlyActiveUsersResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1MonthlyActiveUsersResponse.ts new file mode 100644 index 000000000..a043a2cd5 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1MonthlyActiveUsersResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesBillingV1ActiveUsers } from './ControllerApiResourcesBillingV1ActiveUsers'; +import { + ControllerApiResourcesBillingV1ActiveUsersFromJSON, + ControllerApiResourcesBillingV1ActiveUsersFromJSONTyped, + ControllerApiResourcesBillingV1ActiveUsersToJSON, + ControllerApiResourcesBillingV1ActiveUsersToJSONTyped, +} from './ControllerApiResourcesBillingV1ActiveUsers'; + +/** + * + * @export + * @interface ControllerApiServicesV1MonthlyActiveUsersResponse + */ +export interface ControllerApiServicesV1MonthlyActiveUsersResponse { + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1MonthlyActiveUsersResponse + */ + items?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1MonthlyActiveUsersResponse interface. + */ +export function instanceOfControllerApiServicesV1MonthlyActiveUsersResponse(value: object): value is ControllerApiServicesV1MonthlyActiveUsersResponse { + return true; +} + +export function ControllerApiServicesV1MonthlyActiveUsersResponseFromJSON(json: any): ControllerApiServicesV1MonthlyActiveUsersResponse { + return ControllerApiServicesV1MonthlyActiveUsersResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1MonthlyActiveUsersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1MonthlyActiveUsersResponse { + if (json == null) { + return json; + } + return { + + 'items': json['items'] == null ? undefined : ((json['items'] as Array).map(ControllerApiResourcesBillingV1ActiveUsersFromJSON)), + }; +} + +export function ControllerApiServicesV1MonthlyActiveUsersResponseToJSON(json: any): ControllerApiServicesV1MonthlyActiveUsersResponse { + return ControllerApiServicesV1MonthlyActiveUsersResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1MonthlyActiveUsersResponseToJSONTyped(value?: ControllerApiServicesV1MonthlyActiveUsersResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': value['items'] == null ? undefined : ((value['items'] as Array).map(ControllerApiResourcesBillingV1ActiveUsersToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ReApplyStoragePolicyResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ReApplyStoragePolicyResponse.ts new file mode 100644 index 000000000..68ba425e8 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ReApplyStoragePolicyResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesSessionrecordingsV1SessionRecording } from './ControllerApiResourcesSessionrecordingsV1SessionRecording'; +import { + ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON, + ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSONTyped, + ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSON, + ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSONTyped, +} from './ControllerApiResourcesSessionrecordingsV1SessionRecording'; + +/** + * + * @export + * @interface ControllerApiServicesV1ReApplyStoragePolicyResponse + */ +export interface ControllerApiServicesV1ReApplyStoragePolicyResponse { + /** + * + * @type {ControllerApiResourcesSessionrecordingsV1SessionRecording} + * @memberof ControllerApiServicesV1ReApplyStoragePolicyResponse + */ + item?: ControllerApiResourcesSessionrecordingsV1SessionRecording; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ReApplyStoragePolicyResponse interface. + */ +export function instanceOfControllerApiServicesV1ReApplyStoragePolicyResponse(value: object): value is ControllerApiServicesV1ReApplyStoragePolicyResponse { + return true; +} + +export function ControllerApiServicesV1ReApplyStoragePolicyResponseFromJSON(json: any): ControllerApiServicesV1ReApplyStoragePolicyResponse { + return ControllerApiServicesV1ReApplyStoragePolicyResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ReApplyStoragePolicyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ReApplyStoragePolicyResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1ReApplyStoragePolicyResponseToJSON(json: any): ControllerApiServicesV1ReApplyStoragePolicyResponse { + return ControllerApiServicesV1ReApplyStoragePolicyResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ReApplyStoragePolicyResponseToJSONTyped(value?: ControllerApiServicesV1ReApplyStoragePolicyResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ReadCertificateAuthorityResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ReadCertificateAuthorityResponse.ts new file mode 100644 index 000000000..a967a00c7 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ReadCertificateAuthorityResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1CertificateAuthority } from './ControllerApiResourcesWorkersV1CertificateAuthority'; +import { + ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON, + ControllerApiResourcesWorkersV1CertificateAuthorityFromJSONTyped, + ControllerApiResourcesWorkersV1CertificateAuthorityToJSON, + ControllerApiResourcesWorkersV1CertificateAuthorityToJSONTyped, +} from './ControllerApiResourcesWorkersV1CertificateAuthority'; + +/** + * + * @export + * @interface ControllerApiServicesV1ReadCertificateAuthorityResponse + */ +export interface ControllerApiServicesV1ReadCertificateAuthorityResponse { + /** + * + * @type {ControllerApiResourcesWorkersV1CertificateAuthority} + * @memberof ControllerApiServicesV1ReadCertificateAuthorityResponse + */ + item?: ControllerApiResourcesWorkersV1CertificateAuthority; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ReadCertificateAuthorityResponse interface. + */ +export function instanceOfControllerApiServicesV1ReadCertificateAuthorityResponse(value: object): value is ControllerApiServicesV1ReadCertificateAuthorityResponse { + return true; +} + +export function ControllerApiServicesV1ReadCertificateAuthorityResponseFromJSON(json: any): ControllerApiServicesV1ReadCertificateAuthorityResponse { + return ControllerApiServicesV1ReadCertificateAuthorityResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ReadCertificateAuthorityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ReadCertificateAuthorityResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1ReadCertificateAuthorityResponseToJSON(json: any): ControllerApiServicesV1ReadCertificateAuthorityResponse { + return ControllerApiServicesV1ReadCertificateAuthorityResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ReadCertificateAuthorityResponseToJSONTyped(value?: ControllerApiServicesV1ReadCertificateAuthorityResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesWorkersV1CertificateAuthorityToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ReinitializeCertificateAuthorityResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ReinitializeCertificateAuthorityResponse.ts new file mode 100644 index 000000000..5352826cc --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ReinitializeCertificateAuthorityResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1CertificateAuthority } from './ControllerApiResourcesWorkersV1CertificateAuthority'; +import { + ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON, + ControllerApiResourcesWorkersV1CertificateAuthorityFromJSONTyped, + ControllerApiResourcesWorkersV1CertificateAuthorityToJSON, + ControllerApiResourcesWorkersV1CertificateAuthorityToJSONTyped, +} from './ControllerApiResourcesWorkersV1CertificateAuthority'; + +/** + * + * @export + * @interface ControllerApiServicesV1ReinitializeCertificateAuthorityResponse + */ +export interface ControllerApiServicesV1ReinitializeCertificateAuthorityResponse { + /** + * + * @type {ControllerApiResourcesWorkersV1CertificateAuthority} + * @memberof ControllerApiServicesV1ReinitializeCertificateAuthorityResponse + */ + item?: ControllerApiResourcesWorkersV1CertificateAuthority; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ReinitializeCertificateAuthorityResponse interface. + */ +export function instanceOfControllerApiServicesV1ReinitializeCertificateAuthorityResponse(value: object): value is ControllerApiServicesV1ReinitializeCertificateAuthorityResponse { + return true; +} + +export function ControllerApiServicesV1ReinitializeCertificateAuthorityResponseFromJSON(json: any): ControllerApiServicesV1ReinitializeCertificateAuthorityResponse { + return ControllerApiServicesV1ReinitializeCertificateAuthorityResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ReinitializeCertificateAuthorityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ReinitializeCertificateAuthorityResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1ReinitializeCertificateAuthorityResponseToJSON(json: any): ControllerApiServicesV1ReinitializeCertificateAuthorityResponse { + return ControllerApiServicesV1ReinitializeCertificateAuthorityResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ReinitializeCertificateAuthorityResponseToJSONTyped(value?: ControllerApiServicesV1ReinitializeCertificateAuthorityResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesWorkersV1CertificateAuthorityToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RemoveGroupMembersResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveGroupMembersResponse.ts new file mode 100644 index 000000000..b82e2b73b --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveGroupMembersResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesGroupsV1Group } from './ControllerApiResourcesGroupsV1Group'; +import { + ControllerApiResourcesGroupsV1GroupFromJSON, + ControllerApiResourcesGroupsV1GroupFromJSONTyped, + ControllerApiResourcesGroupsV1GroupToJSON, + ControllerApiResourcesGroupsV1GroupToJSONTyped, +} from './ControllerApiResourcesGroupsV1Group'; + +/** + * + * @export + * @interface ControllerApiServicesV1RemoveGroupMembersResponse + */ +export interface ControllerApiServicesV1RemoveGroupMembersResponse { + /** + * + * @type {ControllerApiResourcesGroupsV1Group} + * @memberof ControllerApiServicesV1RemoveGroupMembersResponse + */ + item?: ControllerApiResourcesGroupsV1Group; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RemoveGroupMembersResponse interface. + */ +export function instanceOfControllerApiServicesV1RemoveGroupMembersResponse(value: object): value is ControllerApiServicesV1RemoveGroupMembersResponse { + return true; +} + +export function ControllerApiServicesV1RemoveGroupMembersResponseFromJSON(json: any): ControllerApiServicesV1RemoveGroupMembersResponse { + return ControllerApiServicesV1RemoveGroupMembersResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveGroupMembersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RemoveGroupMembersResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesGroupsV1GroupFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1RemoveGroupMembersResponseToJSON(json: any): ControllerApiServicesV1RemoveGroupMembersResponse { + return ControllerApiServicesV1RemoveGroupMembersResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveGroupMembersResponseToJSONTyped(value?: ControllerApiServicesV1RemoveGroupMembersResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesGroupsV1GroupToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RemoveHostSetHostsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveHostSetHostsResponse.ts new file mode 100644 index 000000000..18cf0336e --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveHostSetHostsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsetsV1HostSet } from './ControllerApiResourcesHostsetsV1HostSet'; +import { + ControllerApiResourcesHostsetsV1HostSetFromJSON, + ControllerApiResourcesHostsetsV1HostSetFromJSONTyped, + ControllerApiResourcesHostsetsV1HostSetToJSON, + ControllerApiResourcesHostsetsV1HostSetToJSONTyped, +} from './ControllerApiResourcesHostsetsV1HostSet'; + +/** + * + * @export + * @interface ControllerApiServicesV1RemoveHostSetHostsResponse + */ +export interface ControllerApiServicesV1RemoveHostSetHostsResponse { + /** + * + * @type {ControllerApiResourcesHostsetsV1HostSet} + * @memberof ControllerApiServicesV1RemoveHostSetHostsResponse + */ + item?: ControllerApiResourcesHostsetsV1HostSet; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RemoveHostSetHostsResponse interface. + */ +export function instanceOfControllerApiServicesV1RemoveHostSetHostsResponse(value: object): value is ControllerApiServicesV1RemoveHostSetHostsResponse { + return true; +} + +export function ControllerApiServicesV1RemoveHostSetHostsResponseFromJSON(json: any): ControllerApiServicesV1RemoveHostSetHostsResponse { + return ControllerApiServicesV1RemoveHostSetHostsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveHostSetHostsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RemoveHostSetHostsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostsetsV1HostSetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1RemoveHostSetHostsResponseToJSON(json: any): ControllerApiServicesV1RemoveHostSetHostsResponse { + return ControllerApiServicesV1RemoveHostSetHostsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveHostSetHostsResponseToJSONTyped(value?: ControllerApiServicesV1RemoveHostSetHostsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesHostsetsV1HostSetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RemoveRoleGrantScopesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveRoleGrantScopesResponse.ts new file mode 100644 index 000000000..157b5b83b --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveRoleGrantScopesResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1RemoveRoleGrantScopesResponse + */ +export interface ControllerApiServicesV1RemoveRoleGrantScopesResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1RemoveRoleGrantScopesResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RemoveRoleGrantScopesResponse interface. + */ +export function instanceOfControllerApiServicesV1RemoveRoleGrantScopesResponse(value: object): value is ControllerApiServicesV1RemoveRoleGrantScopesResponse { + return true; +} + +export function ControllerApiServicesV1RemoveRoleGrantScopesResponseFromJSON(json: any): ControllerApiServicesV1RemoveRoleGrantScopesResponse { + return ControllerApiServicesV1RemoveRoleGrantScopesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveRoleGrantScopesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RemoveRoleGrantScopesResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1RemoveRoleGrantScopesResponseToJSON(json: any): ControllerApiServicesV1RemoveRoleGrantScopesResponse { + return ControllerApiServicesV1RemoveRoleGrantScopesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveRoleGrantScopesResponseToJSONTyped(value?: ControllerApiServicesV1RemoveRoleGrantScopesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RemoveRoleGrantsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveRoleGrantsResponse.ts new file mode 100644 index 000000000..45d12892d --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveRoleGrantsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1RemoveRoleGrantsResponse + */ +export interface ControllerApiServicesV1RemoveRoleGrantsResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1RemoveRoleGrantsResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RemoveRoleGrantsResponse interface. + */ +export function instanceOfControllerApiServicesV1RemoveRoleGrantsResponse(value: object): value is ControllerApiServicesV1RemoveRoleGrantsResponse { + return true; +} + +export function ControllerApiServicesV1RemoveRoleGrantsResponseFromJSON(json: any): ControllerApiServicesV1RemoveRoleGrantsResponse { + return ControllerApiServicesV1RemoveRoleGrantsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveRoleGrantsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RemoveRoleGrantsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1RemoveRoleGrantsResponseToJSON(json: any): ControllerApiServicesV1RemoveRoleGrantsResponse { + return ControllerApiServicesV1RemoveRoleGrantsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveRoleGrantsResponseToJSONTyped(value?: ControllerApiServicesV1RemoveRoleGrantsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RemoveRolePrincipalsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveRolePrincipalsResponse.ts new file mode 100644 index 000000000..a1e6cee73 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveRolePrincipalsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1RemoveRolePrincipalsResponse + */ +export interface ControllerApiServicesV1RemoveRolePrincipalsResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1RemoveRolePrincipalsResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RemoveRolePrincipalsResponse interface. + */ +export function instanceOfControllerApiServicesV1RemoveRolePrincipalsResponse(value: object): value is ControllerApiServicesV1RemoveRolePrincipalsResponse { + return true; +} + +export function ControllerApiServicesV1RemoveRolePrincipalsResponseFromJSON(json: any): ControllerApiServicesV1RemoveRolePrincipalsResponse { + return ControllerApiServicesV1RemoveRolePrincipalsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveRolePrincipalsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RemoveRolePrincipalsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1RemoveRolePrincipalsResponseToJSON(json: any): ControllerApiServicesV1RemoveRolePrincipalsResponse { + return ControllerApiServicesV1RemoveRolePrincipalsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveRolePrincipalsResponseToJSONTyped(value?: ControllerApiServicesV1RemoveRolePrincipalsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RemoveTargetCredentialSourcesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveTargetCredentialSourcesResponse.ts new file mode 100644 index 000000000..e6a1db711 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveTargetCredentialSourcesResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target'; +import { + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetFromJSONTyped, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiResourcesTargetsV1TargetToJSONTyped, +} from './ControllerApiResourcesTargetsV1Target'; + +/** + * + * @export + * @interface ControllerApiServicesV1RemoveTargetCredentialSourcesResponse + */ +export interface ControllerApiServicesV1RemoveTargetCredentialSourcesResponse { + /** + * + * @type {ControllerApiResourcesTargetsV1Target} + * @memberof ControllerApiServicesV1RemoveTargetCredentialSourcesResponse + */ + item?: ControllerApiResourcesTargetsV1Target; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RemoveTargetCredentialSourcesResponse interface. + */ +export function instanceOfControllerApiServicesV1RemoveTargetCredentialSourcesResponse(value: object): value is ControllerApiServicesV1RemoveTargetCredentialSourcesResponse { + return true; +} + +export function ControllerApiServicesV1RemoveTargetCredentialSourcesResponseFromJSON(json: any): ControllerApiServicesV1RemoveTargetCredentialSourcesResponse { + return ControllerApiServicesV1RemoveTargetCredentialSourcesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveTargetCredentialSourcesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RemoveTargetCredentialSourcesResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1RemoveTargetCredentialSourcesResponseToJSON(json: any): ControllerApiServicesV1RemoveTargetCredentialSourcesResponse { + return ControllerApiServicesV1RemoveTargetCredentialSourcesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveTargetCredentialSourcesResponseToJSONTyped(value?: ControllerApiServicesV1RemoveTargetCredentialSourcesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RemoveTargetHostSourcesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveTargetHostSourcesResponse.ts new file mode 100644 index 000000000..9454b75ae --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveTargetHostSourcesResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target'; +import { + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetFromJSONTyped, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiResourcesTargetsV1TargetToJSONTyped, +} from './ControllerApiResourcesTargetsV1Target'; + +/** + * + * @export + * @interface ControllerApiServicesV1RemoveTargetHostSourcesResponse + */ +export interface ControllerApiServicesV1RemoveTargetHostSourcesResponse { + /** + * + * @type {ControllerApiResourcesTargetsV1Target} + * @memberof ControllerApiServicesV1RemoveTargetHostSourcesResponse + */ + item?: ControllerApiResourcesTargetsV1Target; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RemoveTargetHostSourcesResponse interface. + */ +export function instanceOfControllerApiServicesV1RemoveTargetHostSourcesResponse(value: object): value is ControllerApiServicesV1RemoveTargetHostSourcesResponse { + return true; +} + +export function ControllerApiServicesV1RemoveTargetHostSourcesResponseFromJSON(json: any): ControllerApiServicesV1RemoveTargetHostSourcesResponse { + return ControllerApiServicesV1RemoveTargetHostSourcesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveTargetHostSourcesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RemoveTargetHostSourcesResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1RemoveTargetHostSourcesResponseToJSON(json: any): ControllerApiServicesV1RemoveTargetHostSourcesResponse { + return ControllerApiServicesV1RemoveTargetHostSourcesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveTargetHostSourcesResponseToJSONTyped(value?: ControllerApiServicesV1RemoveTargetHostSourcesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RemoveUserAccountsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveUserAccountsResponse.ts new file mode 100644 index 000000000..58b1123f0 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveUserAccountsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesUsersV1User } from './ControllerApiResourcesUsersV1User'; +import { + ControllerApiResourcesUsersV1UserFromJSON, + ControllerApiResourcesUsersV1UserFromJSONTyped, + ControllerApiResourcesUsersV1UserToJSON, + ControllerApiResourcesUsersV1UserToJSONTyped, +} from './ControllerApiResourcesUsersV1User'; + +/** + * + * @export + * @interface ControllerApiServicesV1RemoveUserAccountsResponse + */ +export interface ControllerApiServicesV1RemoveUserAccountsResponse { + /** + * + * @type {ControllerApiResourcesUsersV1User} + * @memberof ControllerApiServicesV1RemoveUserAccountsResponse + */ + item?: ControllerApiResourcesUsersV1User; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RemoveUserAccountsResponse interface. + */ +export function instanceOfControllerApiServicesV1RemoveUserAccountsResponse(value: object): value is ControllerApiServicesV1RemoveUserAccountsResponse { + return true; +} + +export function ControllerApiServicesV1RemoveUserAccountsResponseFromJSON(json: any): ControllerApiServicesV1RemoveUserAccountsResponse { + return ControllerApiServicesV1RemoveUserAccountsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveUserAccountsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RemoveUserAccountsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesUsersV1UserFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1RemoveUserAccountsResponseToJSON(json: any): ControllerApiServicesV1RemoveUserAccountsResponse { + return ControllerApiServicesV1RemoveUserAccountsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveUserAccountsResponseToJSONTyped(value?: ControllerApiServicesV1RemoveUserAccountsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesUsersV1UserToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RemoveWorkerTagsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveWorkerTagsResponse.ts new file mode 100644 index 000000000..e61773f0c --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RemoveWorkerTagsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1Worker } from './ControllerApiResourcesWorkersV1Worker'; +import { + ControllerApiResourcesWorkersV1WorkerFromJSON, + ControllerApiResourcesWorkersV1WorkerFromJSONTyped, + ControllerApiResourcesWorkersV1WorkerToJSON, + ControllerApiResourcesWorkersV1WorkerToJSONTyped, +} from './ControllerApiResourcesWorkersV1Worker'; + +/** + * + * @export + * @interface ControllerApiServicesV1RemoveWorkerTagsResponse + */ +export interface ControllerApiServicesV1RemoveWorkerTagsResponse { + /** + * + * @type {ControllerApiResourcesWorkersV1Worker} + * @memberof ControllerApiServicesV1RemoveWorkerTagsResponse + */ + item?: ControllerApiResourcesWorkersV1Worker; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RemoveWorkerTagsResponse interface. + */ +export function instanceOfControllerApiServicesV1RemoveWorkerTagsResponse(value: object): value is ControllerApiServicesV1RemoveWorkerTagsResponse { + return true; +} + +export function ControllerApiServicesV1RemoveWorkerTagsResponseFromJSON(json: any): ControllerApiServicesV1RemoveWorkerTagsResponse { + return ControllerApiServicesV1RemoveWorkerTagsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveWorkerTagsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RemoveWorkerTagsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesWorkersV1WorkerFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1RemoveWorkerTagsResponseToJSON(json: any): ControllerApiServicesV1RemoveWorkerTagsResponse { + return ControllerApiServicesV1RemoveWorkerTagsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RemoveWorkerTagsResponseToJSONTyped(value?: ControllerApiServicesV1RemoveWorkerTagsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesWorkersV1WorkerToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody.ts new file mode 100644 index 000000000..3f33e3e08 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody + */ +export interface ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody + */ + grantScopeIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody interface. + */ +export function instanceOfControllerApiServicesV1RoleServiceAddRoleGrantScopesBody(value: object): value is ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody { + return true; +} + +export function ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyFromJSON(json: any): ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody { + return ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'grantScopeIds': json['grant_scope_ids'] == null ? undefined : json['grant_scope_ids'], + }; +} + +export function ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyToJSON(json: any): ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody { + return ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyToJSONTyped(value?: ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'grant_scope_ids': value['grantScopeIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRoleGrantsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRoleGrantsBody.ts new file mode 100644 index 000000000..8bc16c222 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRoleGrantsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1RoleServiceAddRoleGrantsBody + */ +export interface ControllerApiServicesV1RoleServiceAddRoleGrantsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1RoleServiceAddRoleGrantsBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1RoleServiceAddRoleGrantsBody + */ + grantStrings?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RoleServiceAddRoleGrantsBody interface. + */ +export function instanceOfControllerApiServicesV1RoleServiceAddRoleGrantsBody(value: object): value is ControllerApiServicesV1RoleServiceAddRoleGrantsBody { + return true; +} + +export function ControllerApiServicesV1RoleServiceAddRoleGrantsBodyFromJSON(json: any): ControllerApiServicesV1RoleServiceAddRoleGrantsBody { + return ControllerApiServicesV1RoleServiceAddRoleGrantsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceAddRoleGrantsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RoleServiceAddRoleGrantsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'grantStrings': json['grant_strings'] == null ? undefined : json['grant_strings'], + }; +} + +export function ControllerApiServicesV1RoleServiceAddRoleGrantsBodyToJSON(json: any): ControllerApiServicesV1RoleServiceAddRoleGrantsBody { + return ControllerApiServicesV1RoleServiceAddRoleGrantsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceAddRoleGrantsBodyToJSONTyped(value?: ControllerApiServicesV1RoleServiceAddRoleGrantsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'grant_strings': value['grantStrings'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRolePrincipalsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRolePrincipalsBody.ts new file mode 100644 index 000000000..bfd1ac8bb --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceAddRolePrincipalsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1RoleServiceAddRolePrincipalsBody + */ +export interface ControllerApiServicesV1RoleServiceAddRolePrincipalsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1RoleServiceAddRolePrincipalsBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1RoleServiceAddRolePrincipalsBody + */ + principalIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RoleServiceAddRolePrincipalsBody interface. + */ +export function instanceOfControllerApiServicesV1RoleServiceAddRolePrincipalsBody(value: object): value is ControllerApiServicesV1RoleServiceAddRolePrincipalsBody { + return true; +} + +export function ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyFromJSON(json: any): ControllerApiServicesV1RoleServiceAddRolePrincipalsBody { + return ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RoleServiceAddRolePrincipalsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'principalIds': json['principal_ids'] == null ? undefined : json['principal_ids'], + }; +} + +export function ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyToJSON(json: any): ControllerApiServicesV1RoleServiceAddRolePrincipalsBody { + return ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyToJSONTyped(value?: ControllerApiServicesV1RoleServiceAddRolePrincipalsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'principal_ids': value['principalIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody.ts new file mode 100644 index 000000000..4d0867af2 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody + */ +export interface ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody + */ + grantScopeIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody interface. + */ +export function instanceOfControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody(value: object): value is ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody { + return true; +} + +export function ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyFromJSON(json: any): ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody { + return ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'grantScopeIds': json['grant_scope_ids'] == null ? undefined : json['grant_scope_ids'], + }; +} + +export function ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyToJSON(json: any): ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody { + return ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyToJSONTyped(value?: ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'grant_scope_ids': value['grantScopeIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody.ts new file mode 100644 index 000000000..c8387a053 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody + */ +export interface ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody + */ + grantStrings?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody interface. + */ +export function instanceOfControllerApiServicesV1RoleServiceRemoveRoleGrantsBody(value: object): value is ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody { + return true; +} + +export function ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyFromJSON(json: any): ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody { + return ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'grantStrings': json['grant_strings'] == null ? undefined : json['grant_strings'], + }; +} + +export function ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyToJSON(json: any): ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody { + return ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyToJSONTyped(value?: ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'grant_strings': value['grantStrings'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody.ts new file mode 100644 index 000000000..6cbdcda19 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody + */ +export interface ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody + */ + principalIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody interface. + */ +export function instanceOfControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody(value: object): value is ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody { + return true; +} + +export function ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyFromJSON(json: any): ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody { + return ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'principalIds': json['principal_ids'] == null ? undefined : json['principal_ids'], + }; +} + +export function ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyToJSON(json: any): ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody { + return ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyToJSONTyped(value?: ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'principal_ids': value['principalIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody.ts new file mode 100644 index 000000000..c6fecf9bf --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody + */ +export interface ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody + */ + grantScopeIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody interface. + */ +export function instanceOfControllerApiServicesV1RoleServiceSetRoleGrantScopesBody(value: object): value is ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody { + return true; +} + +export function ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyFromJSON(json: any): ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody { + return ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'grantScopeIds': json['grant_scope_ids'] == null ? undefined : json['grant_scope_ids'], + }; +} + +export function ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyToJSON(json: any): ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody { + return ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyToJSONTyped(value?: ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'grant_scope_ids': value['grantScopeIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRoleGrantsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRoleGrantsBody.ts new file mode 100644 index 000000000..dd9662ad8 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRoleGrantsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1RoleServiceSetRoleGrantsBody + */ +export interface ControllerApiServicesV1RoleServiceSetRoleGrantsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1RoleServiceSetRoleGrantsBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1RoleServiceSetRoleGrantsBody + */ + grantStrings?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RoleServiceSetRoleGrantsBody interface. + */ +export function instanceOfControllerApiServicesV1RoleServiceSetRoleGrantsBody(value: object): value is ControllerApiServicesV1RoleServiceSetRoleGrantsBody { + return true; +} + +export function ControllerApiServicesV1RoleServiceSetRoleGrantsBodyFromJSON(json: any): ControllerApiServicesV1RoleServiceSetRoleGrantsBody { + return ControllerApiServicesV1RoleServiceSetRoleGrantsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceSetRoleGrantsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RoleServiceSetRoleGrantsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'grantStrings': json['grant_strings'] == null ? undefined : json['grant_strings'], + }; +} + +export function ControllerApiServicesV1RoleServiceSetRoleGrantsBodyToJSON(json: any): ControllerApiServicesV1RoleServiceSetRoleGrantsBody { + return ControllerApiServicesV1RoleServiceSetRoleGrantsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceSetRoleGrantsBodyToJSONTyped(value?: ControllerApiServicesV1RoleServiceSetRoleGrantsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'grant_strings': value['grantStrings'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRolePrincipalsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRolePrincipalsBody.ts new file mode 100644 index 000000000..53316a6fb --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RoleServiceSetRolePrincipalsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1RoleServiceSetRolePrincipalsBody + */ +export interface ControllerApiServicesV1RoleServiceSetRolePrincipalsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1RoleServiceSetRolePrincipalsBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1RoleServiceSetRolePrincipalsBody + */ + principalIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RoleServiceSetRolePrincipalsBody interface. + */ +export function instanceOfControllerApiServicesV1RoleServiceSetRolePrincipalsBody(value: object): value is ControllerApiServicesV1RoleServiceSetRolePrincipalsBody { + return true; +} + +export function ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyFromJSON(json: any): ControllerApiServicesV1RoleServiceSetRolePrincipalsBody { + return ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RoleServiceSetRolePrincipalsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'principalIds': json['principal_ids'] == null ? undefined : json['principal_ids'], + }; +} + +export function ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyToJSON(json: any): ControllerApiServicesV1RoleServiceSetRolePrincipalsBody { + return ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyToJSONTyped(value?: ControllerApiServicesV1RoleServiceSetRolePrincipalsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'principal_ids': value['principalIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1RotateKeysRequest.ts b/e2e-tests/api-client/models/ControllerApiServicesV1RotateKeysRequest.ts new file mode 100644 index 000000000..6fd181672 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1RotateKeysRequest.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1RotateKeysRequest + */ +export interface ControllerApiServicesV1RotateKeysRequest { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1RotateKeysRequest + */ + scopeId?: string; + /** + * + * @type {boolean} + * @memberof ControllerApiServicesV1RotateKeysRequest + */ + rewrap?: boolean; +} + +/** + * Check if a given object implements the ControllerApiServicesV1RotateKeysRequest interface. + */ +export function instanceOfControllerApiServicesV1RotateKeysRequest(value: object): value is ControllerApiServicesV1RotateKeysRequest { + return true; +} + +export function ControllerApiServicesV1RotateKeysRequestFromJSON(json: any): ControllerApiServicesV1RotateKeysRequest { + return ControllerApiServicesV1RotateKeysRequestFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1RotateKeysRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1RotateKeysRequest { + if (json == null) { + return json; + } + return { + + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'rewrap': json['rewrap'] == null ? undefined : json['rewrap'], + }; +} + +export function ControllerApiServicesV1RotateKeysRequestToJSON(json: any): ControllerApiServicesV1RotateKeysRequest { + return ControllerApiServicesV1RotateKeysRequestToJSONTyped(json, false); +} + +export function ControllerApiServicesV1RotateKeysRequestToJSONTyped(value?: ControllerApiServicesV1RotateKeysRequest | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'scope_id': value['scopeId'], + 'rewrap': value['rewrap'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody.ts new file mode 100644 index 000000000..7a0228033 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody + */ +export interface ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody { + /** + * + * @type {string} + * @memberof ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody + */ + storagePolicyId?: string; + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody + */ + version?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody interface. + */ +export function instanceOfControllerApiServicesV1ScopeServiceAttachStoragePolicyBody(value: object): value is ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody { + return true; +} + +export function ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyFromJSON(json: any): ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody { + return ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody { + if (json == null) { + return json; + } + return { + + 'storagePolicyId': json['storage_policy_id'] == null ? undefined : json['storage_policy_id'], + 'version': json['version'] == null ? undefined : json['version'], + }; +} + +export function ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyToJSON(json: any): ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody { + return ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyToJSONTyped(value?: ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'storage_policy_id': value['storagePolicyId'], + 'version': value['version'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody.ts new file mode 100644 index 000000000..4ffe9fdad --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody + */ +export interface ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody + */ + version?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody interface. + */ +export function instanceOfControllerApiServicesV1ScopeServiceDetachStoragePolicyBody(value: object): value is ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody { + return true; +} + +export function ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyFromJSON(json: any): ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody { + return ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + }; +} + +export function ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyToJSON(json: any): ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody { + return ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyToJSONTyped(value?: ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SessionServiceCancelSessionBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SessionServiceCancelSessionBody.ts new file mode 100644 index 000000000..d7bfd4e46 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SessionServiceCancelSessionBody.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1SessionServiceCancelSessionBody + */ +export interface ControllerApiServicesV1SessionServiceCancelSessionBody { + /** + * + * @type {number} + * @memberof ControllerApiServicesV1SessionServiceCancelSessionBody + */ + version?: number; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SessionServiceCancelSessionBody interface. + */ +export function instanceOfControllerApiServicesV1SessionServiceCancelSessionBody(value: object): value is ControllerApiServicesV1SessionServiceCancelSessionBody { + return true; +} + +export function ControllerApiServicesV1SessionServiceCancelSessionBodyFromJSON(json: any): ControllerApiServicesV1SessionServiceCancelSessionBody { + return ControllerApiServicesV1SessionServiceCancelSessionBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SessionServiceCancelSessionBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SessionServiceCancelSessionBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + }; +} + +export function ControllerApiServicesV1SessionServiceCancelSessionBodyToJSON(json: any): ControllerApiServicesV1SessionServiceCancelSessionBody { + return ControllerApiServicesV1SessionServiceCancelSessionBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SessionServiceCancelSessionBodyToJSONTyped(value?: ControllerApiServicesV1SessionServiceCancelSessionBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SetGroupMembersResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SetGroupMembersResponse.ts new file mode 100644 index 000000000..082fd84fb --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SetGroupMembersResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesGroupsV1Group } from './ControllerApiResourcesGroupsV1Group'; +import { + ControllerApiResourcesGroupsV1GroupFromJSON, + ControllerApiResourcesGroupsV1GroupFromJSONTyped, + ControllerApiResourcesGroupsV1GroupToJSON, + ControllerApiResourcesGroupsV1GroupToJSONTyped, +} from './ControllerApiResourcesGroupsV1Group'; + +/** + * + * @export + * @interface ControllerApiServicesV1SetGroupMembersResponse + */ +export interface ControllerApiServicesV1SetGroupMembersResponse { + /** + * + * @type {ControllerApiResourcesGroupsV1Group} + * @memberof ControllerApiServicesV1SetGroupMembersResponse + */ + item?: ControllerApiResourcesGroupsV1Group; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SetGroupMembersResponse interface. + */ +export function instanceOfControllerApiServicesV1SetGroupMembersResponse(value: object): value is ControllerApiServicesV1SetGroupMembersResponse { + return true; +} + +export function ControllerApiServicesV1SetGroupMembersResponseFromJSON(json: any): ControllerApiServicesV1SetGroupMembersResponse { + return ControllerApiServicesV1SetGroupMembersResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetGroupMembersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SetGroupMembersResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesGroupsV1GroupFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1SetGroupMembersResponseToJSON(json: any): ControllerApiServicesV1SetGroupMembersResponse { + return ControllerApiServicesV1SetGroupMembersResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetGroupMembersResponseToJSONTyped(value?: ControllerApiServicesV1SetGroupMembersResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesGroupsV1GroupToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SetHostSetHostsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SetHostSetHostsResponse.ts new file mode 100644 index 000000000..7ffcb554f --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SetHostSetHostsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsetsV1HostSet } from './ControllerApiResourcesHostsetsV1HostSet'; +import { + ControllerApiResourcesHostsetsV1HostSetFromJSON, + ControllerApiResourcesHostsetsV1HostSetFromJSONTyped, + ControllerApiResourcesHostsetsV1HostSetToJSON, + ControllerApiResourcesHostsetsV1HostSetToJSONTyped, +} from './ControllerApiResourcesHostsetsV1HostSet'; + +/** + * + * @export + * @interface ControllerApiServicesV1SetHostSetHostsResponse + */ +export interface ControllerApiServicesV1SetHostSetHostsResponse { + /** + * + * @type {ControllerApiResourcesHostsetsV1HostSet} + * @memberof ControllerApiServicesV1SetHostSetHostsResponse + */ + item?: ControllerApiResourcesHostsetsV1HostSet; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SetHostSetHostsResponse interface. + */ +export function instanceOfControllerApiServicesV1SetHostSetHostsResponse(value: object): value is ControllerApiServicesV1SetHostSetHostsResponse { + return true; +} + +export function ControllerApiServicesV1SetHostSetHostsResponseFromJSON(json: any): ControllerApiServicesV1SetHostSetHostsResponse { + return ControllerApiServicesV1SetHostSetHostsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetHostSetHostsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SetHostSetHostsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostsetsV1HostSetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1SetHostSetHostsResponseToJSON(json: any): ControllerApiServicesV1SetHostSetHostsResponse { + return ControllerApiServicesV1SetHostSetHostsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetHostSetHostsResponseToJSONTyped(value?: ControllerApiServicesV1SetHostSetHostsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesHostsetsV1HostSetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SetPasswordResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SetPasswordResponse.ts new file mode 100644 index 000000000..07890bd85 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SetPasswordResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAccountsV1Account } from './ControllerApiResourcesAccountsV1Account'; +import { + ControllerApiResourcesAccountsV1AccountFromJSON, + ControllerApiResourcesAccountsV1AccountFromJSONTyped, + ControllerApiResourcesAccountsV1AccountToJSON, + ControllerApiResourcesAccountsV1AccountToJSONTyped, +} from './ControllerApiResourcesAccountsV1Account'; + +/** + * + * @export + * @interface ControllerApiServicesV1SetPasswordResponse + */ +export interface ControllerApiServicesV1SetPasswordResponse { + /** + * + * @type {ControllerApiResourcesAccountsV1Account} + * @memberof ControllerApiServicesV1SetPasswordResponse + */ + item?: ControllerApiResourcesAccountsV1Account; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SetPasswordResponse interface. + */ +export function instanceOfControllerApiServicesV1SetPasswordResponse(value: object): value is ControllerApiServicesV1SetPasswordResponse { + return true; +} + +export function ControllerApiServicesV1SetPasswordResponseFromJSON(json: any): ControllerApiServicesV1SetPasswordResponse { + return ControllerApiServicesV1SetPasswordResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetPasswordResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SetPasswordResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesAccountsV1AccountFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1SetPasswordResponseToJSON(json: any): ControllerApiServicesV1SetPasswordResponse { + return ControllerApiServicesV1SetPasswordResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetPasswordResponseToJSONTyped(value?: ControllerApiServicesV1SetPasswordResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesAccountsV1AccountToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SetRoleGrantScopesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SetRoleGrantScopesResponse.ts new file mode 100644 index 000000000..557879d20 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SetRoleGrantScopesResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1SetRoleGrantScopesResponse + */ +export interface ControllerApiServicesV1SetRoleGrantScopesResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1SetRoleGrantScopesResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SetRoleGrantScopesResponse interface. + */ +export function instanceOfControllerApiServicesV1SetRoleGrantScopesResponse(value: object): value is ControllerApiServicesV1SetRoleGrantScopesResponse { + return true; +} + +export function ControllerApiServicesV1SetRoleGrantScopesResponseFromJSON(json: any): ControllerApiServicesV1SetRoleGrantScopesResponse { + return ControllerApiServicesV1SetRoleGrantScopesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetRoleGrantScopesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SetRoleGrantScopesResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1SetRoleGrantScopesResponseToJSON(json: any): ControllerApiServicesV1SetRoleGrantScopesResponse { + return ControllerApiServicesV1SetRoleGrantScopesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetRoleGrantScopesResponseToJSONTyped(value?: ControllerApiServicesV1SetRoleGrantScopesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SetRoleGrantsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SetRoleGrantsResponse.ts new file mode 100644 index 000000000..aac8f9751 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SetRoleGrantsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1SetRoleGrantsResponse + */ +export interface ControllerApiServicesV1SetRoleGrantsResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1SetRoleGrantsResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SetRoleGrantsResponse interface. + */ +export function instanceOfControllerApiServicesV1SetRoleGrantsResponse(value: object): value is ControllerApiServicesV1SetRoleGrantsResponse { + return true; +} + +export function ControllerApiServicesV1SetRoleGrantsResponseFromJSON(json: any): ControllerApiServicesV1SetRoleGrantsResponse { + return ControllerApiServicesV1SetRoleGrantsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetRoleGrantsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SetRoleGrantsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1SetRoleGrantsResponseToJSON(json: any): ControllerApiServicesV1SetRoleGrantsResponse { + return ControllerApiServicesV1SetRoleGrantsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetRoleGrantsResponseToJSONTyped(value?: ControllerApiServicesV1SetRoleGrantsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SetRolePrincipalsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SetRolePrincipalsResponse.ts new file mode 100644 index 000000000..58387fb04 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SetRolePrincipalsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1SetRolePrincipalsResponse + */ +export interface ControllerApiServicesV1SetRolePrincipalsResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1SetRolePrincipalsResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SetRolePrincipalsResponse interface. + */ +export function instanceOfControllerApiServicesV1SetRolePrincipalsResponse(value: object): value is ControllerApiServicesV1SetRolePrincipalsResponse { + return true; +} + +export function ControllerApiServicesV1SetRolePrincipalsResponseFromJSON(json: any): ControllerApiServicesV1SetRolePrincipalsResponse { + return ControllerApiServicesV1SetRolePrincipalsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetRolePrincipalsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SetRolePrincipalsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1SetRolePrincipalsResponseToJSON(json: any): ControllerApiServicesV1SetRolePrincipalsResponse { + return ControllerApiServicesV1SetRolePrincipalsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetRolePrincipalsResponseToJSONTyped(value?: ControllerApiServicesV1SetRolePrincipalsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SetTargetCredentialSourcesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SetTargetCredentialSourcesResponse.ts new file mode 100644 index 000000000..16086e8dd --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SetTargetCredentialSourcesResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target'; +import { + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetFromJSONTyped, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiResourcesTargetsV1TargetToJSONTyped, +} from './ControllerApiResourcesTargetsV1Target'; + +/** + * + * @export + * @interface ControllerApiServicesV1SetTargetCredentialSourcesResponse + */ +export interface ControllerApiServicesV1SetTargetCredentialSourcesResponse { + /** + * + * @type {ControllerApiResourcesTargetsV1Target} + * @memberof ControllerApiServicesV1SetTargetCredentialSourcesResponse + */ + item?: ControllerApiResourcesTargetsV1Target; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SetTargetCredentialSourcesResponse interface. + */ +export function instanceOfControllerApiServicesV1SetTargetCredentialSourcesResponse(value: object): value is ControllerApiServicesV1SetTargetCredentialSourcesResponse { + return true; +} + +export function ControllerApiServicesV1SetTargetCredentialSourcesResponseFromJSON(json: any): ControllerApiServicesV1SetTargetCredentialSourcesResponse { + return ControllerApiServicesV1SetTargetCredentialSourcesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetTargetCredentialSourcesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SetTargetCredentialSourcesResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1SetTargetCredentialSourcesResponseToJSON(json: any): ControllerApiServicesV1SetTargetCredentialSourcesResponse { + return ControllerApiServicesV1SetTargetCredentialSourcesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetTargetCredentialSourcesResponseToJSONTyped(value?: ControllerApiServicesV1SetTargetCredentialSourcesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SetTargetHostSourcesResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SetTargetHostSourcesResponse.ts new file mode 100644 index 000000000..c4f29d7e2 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SetTargetHostSourcesResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target'; +import { + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetFromJSONTyped, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiResourcesTargetsV1TargetToJSONTyped, +} from './ControllerApiResourcesTargetsV1Target'; + +/** + * + * @export + * @interface ControllerApiServicesV1SetTargetHostSourcesResponse + */ +export interface ControllerApiServicesV1SetTargetHostSourcesResponse { + /** + * + * @type {ControllerApiResourcesTargetsV1Target} + * @memberof ControllerApiServicesV1SetTargetHostSourcesResponse + */ + item?: ControllerApiResourcesTargetsV1Target; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SetTargetHostSourcesResponse interface. + */ +export function instanceOfControllerApiServicesV1SetTargetHostSourcesResponse(value: object): value is ControllerApiServicesV1SetTargetHostSourcesResponse { + return true; +} + +export function ControllerApiServicesV1SetTargetHostSourcesResponseFromJSON(json: any): ControllerApiServicesV1SetTargetHostSourcesResponse { + return ControllerApiServicesV1SetTargetHostSourcesResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetTargetHostSourcesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SetTargetHostSourcesResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1SetTargetHostSourcesResponseToJSON(json: any): ControllerApiServicesV1SetTargetHostSourcesResponse { + return ControllerApiServicesV1SetTargetHostSourcesResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetTargetHostSourcesResponseToJSONTyped(value?: ControllerApiServicesV1SetTargetHostSourcesResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SetUserAccountsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SetUserAccountsResponse.ts new file mode 100644 index 000000000..9fa7fa704 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SetUserAccountsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesUsersV1User } from './ControllerApiResourcesUsersV1User'; +import { + ControllerApiResourcesUsersV1UserFromJSON, + ControllerApiResourcesUsersV1UserFromJSONTyped, + ControllerApiResourcesUsersV1UserToJSON, + ControllerApiResourcesUsersV1UserToJSONTyped, +} from './ControllerApiResourcesUsersV1User'; + +/** + * + * @export + * @interface ControllerApiServicesV1SetUserAccountsResponse + */ +export interface ControllerApiServicesV1SetUserAccountsResponse { + /** + * + * @type {ControllerApiResourcesUsersV1User} + * @memberof ControllerApiServicesV1SetUserAccountsResponse + */ + item?: ControllerApiResourcesUsersV1User; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SetUserAccountsResponse interface. + */ +export function instanceOfControllerApiServicesV1SetUserAccountsResponse(value: object): value is ControllerApiServicesV1SetUserAccountsResponse { + return true; +} + +export function ControllerApiServicesV1SetUserAccountsResponseFromJSON(json: any): ControllerApiServicesV1SetUserAccountsResponse { + return ControllerApiServicesV1SetUserAccountsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetUserAccountsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SetUserAccountsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesUsersV1UserFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1SetUserAccountsResponseToJSON(json: any): ControllerApiServicesV1SetUserAccountsResponse { + return ControllerApiServicesV1SetUserAccountsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetUserAccountsResponseToJSONTyped(value?: ControllerApiServicesV1SetUserAccountsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesUsersV1UserToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1SetWorkerTagsResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1SetWorkerTagsResponse.ts new file mode 100644 index 000000000..eaad3887f --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1SetWorkerTagsResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1Worker } from './ControllerApiResourcesWorkersV1Worker'; +import { + ControllerApiResourcesWorkersV1WorkerFromJSON, + ControllerApiResourcesWorkersV1WorkerFromJSONTyped, + ControllerApiResourcesWorkersV1WorkerToJSON, + ControllerApiResourcesWorkersV1WorkerToJSONTyped, +} from './ControllerApiResourcesWorkersV1Worker'; + +/** + * + * @export + * @interface ControllerApiServicesV1SetWorkerTagsResponse + */ +export interface ControllerApiServicesV1SetWorkerTagsResponse { + /** + * + * @type {ControllerApiResourcesWorkersV1Worker} + * @memberof ControllerApiServicesV1SetWorkerTagsResponse + */ + item?: ControllerApiResourcesWorkersV1Worker; +} + +/** + * Check if a given object implements the ControllerApiServicesV1SetWorkerTagsResponse interface. + */ +export function instanceOfControllerApiServicesV1SetWorkerTagsResponse(value: object): value is ControllerApiServicesV1SetWorkerTagsResponse { + return true; +} + +export function ControllerApiServicesV1SetWorkerTagsResponseFromJSON(json: any): ControllerApiServicesV1SetWorkerTagsResponse { + return ControllerApiServicesV1SetWorkerTagsResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetWorkerTagsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1SetWorkerTagsResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesWorkersV1WorkerFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1SetWorkerTagsResponseToJSON(json: any): ControllerApiServicesV1SetWorkerTagsResponse { + return ControllerApiServicesV1SetWorkerTagsResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1SetWorkerTagsResponseToJSONTyped(value?: ControllerApiServicesV1SetWorkerTagsResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesWorkersV1WorkerToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody.ts new file mode 100644 index 000000000..c7f4d1a3a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody + */ +export interface ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody + */ + version?: number; + /** + * Brokered credentials are returned to the user during session authorization. + * @type {Array} + * @memberof ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody + */ + brokeredCredentialSourceIds?: Array; + /** + * Injected application credentials are used by a Boundary worker to secure the + * connection between the worker and the endpoint. Injected application credentials are + * never returned to the user. + * @type {Array} + * @memberof ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody + */ + injectedApplicationCredentialSourceIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody interface. + */ +export function instanceOfControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody(value: object): value is ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody { + return true; +} + +export function ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyFromJSON(json: any): ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody { + return ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'brokeredCredentialSourceIds': json['brokered_credential_source_ids'] == null ? undefined : json['brokered_credential_source_ids'], + 'injectedApplicationCredentialSourceIds': json['injected_application_credential_source_ids'] == null ? undefined : json['injected_application_credential_source_ids'], + }; +} + +export function ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyToJSON(json: any): ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody { + return ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyToJSONTyped(value?: ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'brokered_credential_source_ids': value['brokeredCredentialSourceIds'], + 'injected_application_credential_source_ids': value['injectedApplicationCredentialSourceIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody.ts new file mode 100644 index 000000000..4f0112d58 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody + */ +export interface ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody + */ + hostSourceIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody interface. + */ +export function instanceOfControllerApiServicesV1TargetServiceAddTargetHostSourcesBody(value: object): value is ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody { + return true; +} + +export function ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyFromJSON(json: any): ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody { + return ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'hostSourceIds': json['host_source_ids'] == null ? undefined : json['host_source_ids'], + }; +} + +export function ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyToJSON(json: any): ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody { + return ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyToJSONTyped(value?: ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'host_source_ids': value['hostSourceIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAuthorizeSessionBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAuthorizeSessionBody.ts new file mode 100644 index 000000000..27554f331 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceAuthorizeSessionBody.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1TargetServiceAuthorizeSessionBody + */ +export interface ControllerApiServicesV1TargetServiceAuthorizeSessionBody { + /** + * The name of the target. When using this, scope_id or scope_name must be set. + * @type {string} + * @memberof ControllerApiServicesV1TargetServiceAuthorizeSessionBody + */ + name?: string; + /** + * The scope ID containing the target, if specifying the target by name. + * @type {string} + * @memberof ControllerApiServicesV1TargetServiceAuthorizeSessionBody + */ + scopeId?: string; + /** + * The scope name containing the target, if specifying the target by name. + * @type {string} + * @memberof ControllerApiServicesV1TargetServiceAuthorizeSessionBody + */ + scopeName?: string; + /** + * An optional parameter allowing specification of the particular Host within the Target's configured Host Sets to connect to during this Session. + * @type {string} + * @memberof ControllerApiServicesV1TargetServiceAuthorizeSessionBody + */ + hostId?: string; +} + +/** + * Check if a given object implements the ControllerApiServicesV1TargetServiceAuthorizeSessionBody interface. + */ +export function instanceOfControllerApiServicesV1TargetServiceAuthorizeSessionBody(value: object): value is ControllerApiServicesV1TargetServiceAuthorizeSessionBody { + return true; +} + +export function ControllerApiServicesV1TargetServiceAuthorizeSessionBodyFromJSON(json: any): ControllerApiServicesV1TargetServiceAuthorizeSessionBody { + return ControllerApiServicesV1TargetServiceAuthorizeSessionBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceAuthorizeSessionBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1TargetServiceAuthorizeSessionBody { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'scopeId': json['scope_id'] == null ? undefined : json['scope_id'], + 'scopeName': json['scope_name'] == null ? undefined : json['scope_name'], + 'hostId': json['host_id'] == null ? undefined : json['host_id'], + }; +} + +export function ControllerApiServicesV1TargetServiceAuthorizeSessionBodyToJSON(json: any): ControllerApiServicesV1TargetServiceAuthorizeSessionBody { + return ControllerApiServicesV1TargetServiceAuthorizeSessionBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceAuthorizeSessionBodyToJSONTyped(value?: ControllerApiServicesV1TargetServiceAuthorizeSessionBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'scope_id': value['scopeId'], + 'scope_name': value['scopeName'], + 'host_id': value['hostId'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody.ts new file mode 100644 index 000000000..e1c5a3cf6 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody.ts @@ -0,0 +1,84 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody + */ +export interface ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody + */ + version?: number; + /** + * Brokered credentials are returned to the user during session authorization. + * @type {Array} + * @memberof ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody + */ + brokeredCredentialSourceIds?: Array; + /** + * Injected application credentials are used by a Boundary worker to secure the + * connection between the worker and the endpoint. Injected application credentials are + * never returned to the user. + * @type {Array} + * @memberof ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody + */ + injectedApplicationCredentialSourceIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody interface. + */ +export function instanceOfControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody(value: object): value is ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody { + return true; +} + +export function ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyFromJSON(json: any): ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody { + return ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'brokeredCredentialSourceIds': json['brokered_credential_source_ids'] == null ? undefined : json['brokered_credential_source_ids'], + 'injectedApplicationCredentialSourceIds': json['injected_application_credential_source_ids'] == null ? undefined : json['injected_application_credential_source_ids'], + }; +} + +export function ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyToJSON(json: any): ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody { + return ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyToJSONTyped(value?: ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'brokered_credential_source_ids': value['brokeredCredentialSourceIds'], + 'injected_application_credential_source_ids': value['injectedApplicationCredentialSourceIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody.ts new file mode 100644 index 000000000..d76df21c4 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody + */ +export interface ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody + */ + hostSourceIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody interface. + */ +export function instanceOfControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody(value: object): value is ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody { + return true; +} + +export function ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyFromJSON(json: any): ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody { + return ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'hostSourceIds': json['host_source_ids'] == null ? undefined : json['host_source_ids'], + }; +} + +export function ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyToJSON(json: any): ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody { + return ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyToJSONTyped(value?: ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'host_source_ids': value['hostSourceIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody.ts new file mode 100644 index 000000000..51cf35a32 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Sets the values for credential sources. Any credential_source_id field that + * is not set in the request will result in those fields being cleared. + * @export + * @interface ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody + */ +export interface ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody + */ + version?: number; + /** + * Brokered credentials are returned to the user during session authorization. + * @type {Array} + * @memberof ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody + */ + brokeredCredentialSourceIds?: Array; + /** + * Injected application credentials are used by a Boundary worker to secure the + * connection between the worker and the endpoint. Injected application credentials are + * never returned to the user. + * @type {Array} + * @memberof ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody + */ + injectedApplicationCredentialSourceIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody interface. + */ +export function instanceOfControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody(value: object): value is ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody { + return true; +} + +export function ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyFromJSON(json: any): ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody { + return ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'brokeredCredentialSourceIds': json['brokered_credential_source_ids'] == null ? undefined : json['brokered_credential_source_ids'], + 'injectedApplicationCredentialSourceIds': json['injected_application_credential_source_ids'] == null ? undefined : json['injected_application_credential_source_ids'], + }; +} + +export function ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyToJSON(json: any): ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody { + return ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyToJSONTyped(value?: ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'brokered_credential_source_ids': value['brokeredCredentialSourceIds'], + 'injected_application_credential_source_ids': value['injectedApplicationCredentialSourceIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody.ts new file mode 100644 index 000000000..2e1723e05 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody + */ +export interface ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody + */ + hostSourceIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody interface. + */ +export function instanceOfControllerApiServicesV1TargetServiceSetTargetHostSourcesBody(value: object): value is ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody { + return true; +} + +export function ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyFromJSON(json: any): ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody { + return ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'hostSourceIds': json['host_source_ids'] == null ? undefined : json['host_source_ids'], + }; +} + +export function ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyToJSON(json: any): ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody { + return ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyToJSONTyped(value?: ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'host_source_ids': value['hostSourceIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateAccountResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateAccountResponse.ts new file mode 100644 index 000000000..68b67a098 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateAccountResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAccountsV1Account } from './ControllerApiResourcesAccountsV1Account'; +import { + ControllerApiResourcesAccountsV1AccountFromJSON, + ControllerApiResourcesAccountsV1AccountFromJSONTyped, + ControllerApiResourcesAccountsV1AccountToJSON, + ControllerApiResourcesAccountsV1AccountToJSONTyped, +} from './ControllerApiResourcesAccountsV1Account'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateAccountResponse + */ +export interface ControllerApiServicesV1UpdateAccountResponse { + /** + * + * @type {ControllerApiResourcesAccountsV1Account} + * @memberof ControllerApiServicesV1UpdateAccountResponse + */ + item?: ControllerApiResourcesAccountsV1Account; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateAccountResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateAccountResponse(value: object): value is ControllerApiServicesV1UpdateAccountResponse { + return true; +} + +export function ControllerApiServicesV1UpdateAccountResponseFromJSON(json: any): ControllerApiServicesV1UpdateAccountResponse { + return ControllerApiServicesV1UpdateAccountResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateAccountResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateAccountResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesAccountsV1AccountFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateAccountResponseToJSON(json: any): ControllerApiServicesV1UpdateAccountResponse { + return ControllerApiServicesV1UpdateAccountResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateAccountResponseToJSONTyped(value?: ControllerApiServicesV1UpdateAccountResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesAccountsV1AccountToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateAliasResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateAliasResponse.ts new file mode 100644 index 000000000..ebe30ad98 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateAliasResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAliasesV1Alias } from './ControllerApiResourcesAliasesV1Alias'; +import { + ControllerApiResourcesAliasesV1AliasFromJSON, + ControllerApiResourcesAliasesV1AliasFromJSONTyped, + ControllerApiResourcesAliasesV1AliasToJSON, + ControllerApiResourcesAliasesV1AliasToJSONTyped, +} from './ControllerApiResourcesAliasesV1Alias'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateAliasResponse + */ +export interface ControllerApiServicesV1UpdateAliasResponse { + /** + * + * @type {ControllerApiResourcesAliasesV1Alias} + * @memberof ControllerApiServicesV1UpdateAliasResponse + */ + item?: ControllerApiResourcesAliasesV1Alias; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateAliasResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateAliasResponse(value: object): value is ControllerApiServicesV1UpdateAliasResponse { + return true; +} + +export function ControllerApiServicesV1UpdateAliasResponseFromJSON(json: any): ControllerApiServicesV1UpdateAliasResponse { + return ControllerApiServicesV1UpdateAliasResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateAliasResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateAliasResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesAliasesV1AliasFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateAliasResponseToJSON(json: any): ControllerApiServicesV1UpdateAliasResponse { + return ControllerApiServicesV1UpdateAliasResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateAliasResponseToJSONTyped(value?: ControllerApiServicesV1UpdateAliasResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesAliasesV1AliasToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateAuthMethodResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateAuthMethodResponse.ts new file mode 100644 index 000000000..8ba5a9ee3 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateAuthMethodResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesAuthmethodsV1AuthMethod } from './ControllerApiResourcesAuthmethodsV1AuthMethod'; +import { + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodFromJSONTyped, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSON, + ControllerApiResourcesAuthmethodsV1AuthMethodToJSONTyped, +} from './ControllerApiResourcesAuthmethodsV1AuthMethod'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateAuthMethodResponse + */ +export interface ControllerApiServicesV1UpdateAuthMethodResponse { + /** + * + * @type {ControllerApiResourcesAuthmethodsV1AuthMethod} + * @memberof ControllerApiServicesV1UpdateAuthMethodResponse + */ + item?: ControllerApiResourcesAuthmethodsV1AuthMethod; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateAuthMethodResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateAuthMethodResponse(value: object): value is ControllerApiServicesV1UpdateAuthMethodResponse { + return true; +} + +export function ControllerApiServicesV1UpdateAuthMethodResponseFromJSON(json: any): ControllerApiServicesV1UpdateAuthMethodResponse { + return ControllerApiServicesV1UpdateAuthMethodResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateAuthMethodResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateAuthMethodResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateAuthMethodResponseToJSON(json: any): ControllerApiServicesV1UpdateAuthMethodResponse { + return ControllerApiServicesV1UpdateAuthMethodResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateAuthMethodResponseToJSONTyped(value?: ControllerApiServicesV1UpdateAuthMethodResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesAuthmethodsV1AuthMethodToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialLibraryResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialLibraryResponse.ts new file mode 100644 index 000000000..e687fff1f --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialLibraryResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentiallibrariesV1CredentialLibrary } from './ControllerApiResourcesCredentiallibrariesV1CredentialLibrary'; +import { + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSONTyped, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON, + ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSONTyped, +} from './ControllerApiResourcesCredentiallibrariesV1CredentialLibrary'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateCredentialLibraryResponse + */ +export interface ControllerApiServicesV1UpdateCredentialLibraryResponse { + /** + * + * @type {ControllerApiResourcesCredentiallibrariesV1CredentialLibrary} + * @memberof ControllerApiServicesV1UpdateCredentialLibraryResponse + */ + item?: ControllerApiResourcesCredentiallibrariesV1CredentialLibrary; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateCredentialLibraryResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateCredentialLibraryResponse(value: object): value is ControllerApiServicesV1UpdateCredentialLibraryResponse { + return true; +} + +export function ControllerApiServicesV1UpdateCredentialLibraryResponseFromJSON(json: any): ControllerApiServicesV1UpdateCredentialLibraryResponse { + return ControllerApiServicesV1UpdateCredentialLibraryResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateCredentialLibraryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateCredentialLibraryResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateCredentialLibraryResponseToJSON(json: any): ControllerApiServicesV1UpdateCredentialLibraryResponse { + return ControllerApiServicesV1UpdateCredentialLibraryResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateCredentialLibraryResponseToJSONTyped(value?: ControllerApiServicesV1UpdateCredentialLibraryResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialResponse.ts new file mode 100644 index 000000000..49bb6e469 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentialsV1Credential } from './ControllerApiResourcesCredentialsV1Credential'; +import { + ControllerApiResourcesCredentialsV1CredentialFromJSON, + ControllerApiResourcesCredentialsV1CredentialFromJSONTyped, + ControllerApiResourcesCredentialsV1CredentialToJSON, + ControllerApiResourcesCredentialsV1CredentialToJSONTyped, +} from './ControllerApiResourcesCredentialsV1Credential'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateCredentialResponse + */ +export interface ControllerApiServicesV1UpdateCredentialResponse { + /** + * + * @type {ControllerApiResourcesCredentialsV1Credential} + * @memberof ControllerApiServicesV1UpdateCredentialResponse + */ + item?: ControllerApiResourcesCredentialsV1Credential; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateCredentialResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateCredentialResponse(value: object): value is ControllerApiServicesV1UpdateCredentialResponse { + return true; +} + +export function ControllerApiServicesV1UpdateCredentialResponseFromJSON(json: any): ControllerApiServicesV1UpdateCredentialResponse { + return ControllerApiServicesV1UpdateCredentialResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateCredentialResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateCredentialResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesCredentialsV1CredentialFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateCredentialResponseToJSON(json: any): ControllerApiServicesV1UpdateCredentialResponse { + return ControllerApiServicesV1UpdateCredentialResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateCredentialResponseToJSONTyped(value?: ControllerApiServicesV1UpdateCredentialResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesCredentialsV1CredentialToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialStoreResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialStoreResponse.ts new file mode 100644 index 000000000..84cdd1745 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateCredentialStoreResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesCredentialstoresV1CredentialStore } from './ControllerApiResourcesCredentialstoresV1CredentialStore'; +import { + ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON, + ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSONTyped, + ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON, + ControllerApiResourcesCredentialstoresV1CredentialStoreToJSONTyped, +} from './ControllerApiResourcesCredentialstoresV1CredentialStore'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateCredentialStoreResponse + */ +export interface ControllerApiServicesV1UpdateCredentialStoreResponse { + /** + * + * @type {ControllerApiResourcesCredentialstoresV1CredentialStore} + * @memberof ControllerApiServicesV1UpdateCredentialStoreResponse + */ + item?: ControllerApiResourcesCredentialstoresV1CredentialStore; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateCredentialStoreResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateCredentialStoreResponse(value: object): value is ControllerApiServicesV1UpdateCredentialStoreResponse { + return true; +} + +export function ControllerApiServicesV1UpdateCredentialStoreResponseFromJSON(json: any): ControllerApiServicesV1UpdateCredentialStoreResponse { + return ControllerApiServicesV1UpdateCredentialStoreResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateCredentialStoreResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateCredentialStoreResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateCredentialStoreResponseToJSON(json: any): ControllerApiServicesV1UpdateCredentialStoreResponse { + return ControllerApiServicesV1UpdateCredentialStoreResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateCredentialStoreResponseToJSONTyped(value?: ControllerApiServicesV1UpdateCredentialStoreResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateGroupResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateGroupResponse.ts new file mode 100644 index 000000000..45c8281bd --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateGroupResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesGroupsV1Group } from './ControllerApiResourcesGroupsV1Group'; +import { + ControllerApiResourcesGroupsV1GroupFromJSON, + ControllerApiResourcesGroupsV1GroupFromJSONTyped, + ControllerApiResourcesGroupsV1GroupToJSON, + ControllerApiResourcesGroupsV1GroupToJSONTyped, +} from './ControllerApiResourcesGroupsV1Group'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateGroupResponse + */ +export interface ControllerApiServicesV1UpdateGroupResponse { + /** + * + * @type {ControllerApiResourcesGroupsV1Group} + * @memberof ControllerApiServicesV1UpdateGroupResponse + */ + item?: ControllerApiResourcesGroupsV1Group; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateGroupResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateGroupResponse(value: object): value is ControllerApiServicesV1UpdateGroupResponse { + return true; +} + +export function ControllerApiServicesV1UpdateGroupResponseFromJSON(json: any): ControllerApiServicesV1UpdateGroupResponse { + return ControllerApiServicesV1UpdateGroupResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateGroupResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateGroupResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesGroupsV1GroupFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateGroupResponseToJSON(json: any): ControllerApiServicesV1UpdateGroupResponse { + return ControllerApiServicesV1UpdateGroupResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateGroupResponseToJSONTyped(value?: ControllerApiServicesV1UpdateGroupResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesGroupsV1GroupToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostCatalogResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostCatalogResponse.ts new file mode 100644 index 000000000..4d56978d6 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostCatalogResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostcatalogsV1HostCatalog } from './ControllerApiResourcesHostcatalogsV1HostCatalog'; +import { + ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON, + ControllerApiResourcesHostcatalogsV1HostCatalogFromJSONTyped, + ControllerApiResourcesHostcatalogsV1HostCatalogToJSON, + ControllerApiResourcesHostcatalogsV1HostCatalogToJSONTyped, +} from './ControllerApiResourcesHostcatalogsV1HostCatalog'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateHostCatalogResponse + */ +export interface ControllerApiServicesV1UpdateHostCatalogResponse { + /** + * + * @type {ControllerApiResourcesHostcatalogsV1HostCatalog} + * @memberof ControllerApiServicesV1UpdateHostCatalogResponse + */ + item?: ControllerApiResourcesHostcatalogsV1HostCatalog; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateHostCatalogResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateHostCatalogResponse(value: object): value is ControllerApiServicesV1UpdateHostCatalogResponse { + return true; +} + +export function ControllerApiServicesV1UpdateHostCatalogResponseFromJSON(json: any): ControllerApiServicesV1UpdateHostCatalogResponse { + return ControllerApiServicesV1UpdateHostCatalogResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateHostCatalogResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateHostCatalogResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateHostCatalogResponseToJSON(json: any): ControllerApiServicesV1UpdateHostCatalogResponse { + return ControllerApiServicesV1UpdateHostCatalogResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateHostCatalogResponseToJSONTyped(value?: ControllerApiServicesV1UpdateHostCatalogResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesHostcatalogsV1HostCatalogToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostResponse.ts new file mode 100644 index 000000000..27dee569e --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsV1Host } from './ControllerApiResourcesHostsV1Host'; +import { + ControllerApiResourcesHostsV1HostFromJSON, + ControllerApiResourcesHostsV1HostFromJSONTyped, + ControllerApiResourcesHostsV1HostToJSON, + ControllerApiResourcesHostsV1HostToJSONTyped, +} from './ControllerApiResourcesHostsV1Host'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateHostResponse + */ +export interface ControllerApiServicesV1UpdateHostResponse { + /** + * + * @type {ControllerApiResourcesHostsV1Host} + * @memberof ControllerApiServicesV1UpdateHostResponse + */ + item?: ControllerApiResourcesHostsV1Host; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateHostResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateHostResponse(value: object): value is ControllerApiServicesV1UpdateHostResponse { + return true; +} + +export function ControllerApiServicesV1UpdateHostResponseFromJSON(json: any): ControllerApiServicesV1UpdateHostResponse { + return ControllerApiServicesV1UpdateHostResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateHostResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateHostResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostsV1HostFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateHostResponseToJSON(json: any): ControllerApiServicesV1UpdateHostResponse { + return ControllerApiServicesV1UpdateHostResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateHostResponseToJSONTyped(value?: ControllerApiServicesV1UpdateHostResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesHostsV1HostToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostSetResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostSetResponse.ts new file mode 100644 index 000000000..2c29763d5 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateHostSetResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesHostsetsV1HostSet } from './ControllerApiResourcesHostsetsV1HostSet'; +import { + ControllerApiResourcesHostsetsV1HostSetFromJSON, + ControllerApiResourcesHostsetsV1HostSetFromJSONTyped, + ControllerApiResourcesHostsetsV1HostSetToJSON, + ControllerApiResourcesHostsetsV1HostSetToJSONTyped, +} from './ControllerApiResourcesHostsetsV1HostSet'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateHostSetResponse + */ +export interface ControllerApiServicesV1UpdateHostSetResponse { + /** + * + * @type {ControllerApiResourcesHostsetsV1HostSet} + * @memberof ControllerApiServicesV1UpdateHostSetResponse + */ + item?: ControllerApiResourcesHostsetsV1HostSet; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateHostSetResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateHostSetResponse(value: object): value is ControllerApiServicesV1UpdateHostSetResponse { + return true; +} + +export function ControllerApiServicesV1UpdateHostSetResponseFromJSON(json: any): ControllerApiServicesV1UpdateHostSetResponse { + return ControllerApiServicesV1UpdateHostSetResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateHostSetResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateHostSetResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesHostsetsV1HostSetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateHostSetResponseToJSON(json: any): ControllerApiServicesV1UpdateHostSetResponse { + return ControllerApiServicesV1UpdateHostSetResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateHostSetResponseToJSONTyped(value?: ControllerApiServicesV1UpdateHostSetResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesHostsetsV1HostSetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateManagedGroupResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateManagedGroupResponse.ts new file mode 100644 index 000000000..e4079a809 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateManagedGroupResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesManagedgroupsV1ManagedGroup } from './ControllerApiResourcesManagedgroupsV1ManagedGroup'; +import { + ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON, + ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSONTyped, + ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON, + ControllerApiResourcesManagedgroupsV1ManagedGroupToJSONTyped, +} from './ControllerApiResourcesManagedgroupsV1ManagedGroup'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateManagedGroupResponse + */ +export interface ControllerApiServicesV1UpdateManagedGroupResponse { + /** + * + * @type {ControllerApiResourcesManagedgroupsV1ManagedGroup} + * @memberof ControllerApiServicesV1UpdateManagedGroupResponse + */ + item?: ControllerApiResourcesManagedgroupsV1ManagedGroup; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateManagedGroupResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateManagedGroupResponse(value: object): value is ControllerApiServicesV1UpdateManagedGroupResponse { + return true; +} + +export function ControllerApiServicesV1UpdateManagedGroupResponseFromJSON(json: any): ControllerApiServicesV1UpdateManagedGroupResponse { + return ControllerApiServicesV1UpdateManagedGroupResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateManagedGroupResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateManagedGroupResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateManagedGroupResponseToJSON(json: any): ControllerApiServicesV1UpdateManagedGroupResponse { + return ControllerApiServicesV1UpdateManagedGroupResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateManagedGroupResponseToJSONTyped(value?: ControllerApiServicesV1UpdateManagedGroupResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdatePolicyResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdatePolicyResponse.ts new file mode 100644 index 000000000..1f697396a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdatePolicyResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesPoliciesV1Policy } from './ControllerApiResourcesPoliciesV1Policy'; +import { + ControllerApiResourcesPoliciesV1PolicyFromJSON, + ControllerApiResourcesPoliciesV1PolicyFromJSONTyped, + ControllerApiResourcesPoliciesV1PolicyToJSON, + ControllerApiResourcesPoliciesV1PolicyToJSONTyped, +} from './ControllerApiResourcesPoliciesV1Policy'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdatePolicyResponse + */ +export interface ControllerApiServicesV1UpdatePolicyResponse { + /** + * + * @type {ControllerApiResourcesPoliciesV1Policy} + * @memberof ControllerApiServicesV1UpdatePolicyResponse + */ + item?: ControllerApiResourcesPoliciesV1Policy; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdatePolicyResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdatePolicyResponse(value: object): value is ControllerApiServicesV1UpdatePolicyResponse { + return true; +} + +export function ControllerApiServicesV1UpdatePolicyResponseFromJSON(json: any): ControllerApiServicesV1UpdatePolicyResponse { + return ControllerApiServicesV1UpdatePolicyResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdatePolicyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdatePolicyResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesPoliciesV1PolicyFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdatePolicyResponseToJSON(json: any): ControllerApiServicesV1UpdatePolicyResponse { + return ControllerApiServicesV1UpdatePolicyResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdatePolicyResponseToJSONTyped(value?: ControllerApiServicesV1UpdatePolicyResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesPoliciesV1PolicyToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateRoleResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateRoleResponse.ts new file mode 100644 index 000000000..8b752eef3 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateRoleResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role'; +import { + ControllerApiResourcesRolesV1RoleFromJSON, + ControllerApiResourcesRolesV1RoleFromJSONTyped, + ControllerApiResourcesRolesV1RoleToJSON, + ControllerApiResourcesRolesV1RoleToJSONTyped, +} from './ControllerApiResourcesRolesV1Role'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateRoleResponse + */ +export interface ControllerApiServicesV1UpdateRoleResponse { + /** + * + * @type {ControllerApiResourcesRolesV1Role} + * @memberof ControllerApiServicesV1UpdateRoleResponse + */ + item?: ControllerApiResourcesRolesV1Role; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateRoleResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateRoleResponse(value: object): value is ControllerApiServicesV1UpdateRoleResponse { + return true; +} + +export function ControllerApiServicesV1UpdateRoleResponseFromJSON(json: any): ControllerApiServicesV1UpdateRoleResponse { + return ControllerApiServicesV1UpdateRoleResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateRoleResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateRoleResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateRoleResponseToJSON(json: any): ControllerApiServicesV1UpdateRoleResponse { + return ControllerApiServicesV1UpdateRoleResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateRoleResponseToJSONTyped(value?: ControllerApiServicesV1UpdateRoleResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateScopeResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateScopeResponse.ts new file mode 100644 index 000000000..97fc12663 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateScopeResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesScopesV1Scope } from './ControllerApiResourcesScopesV1Scope'; +import { + ControllerApiResourcesScopesV1ScopeFromJSON, + ControllerApiResourcesScopesV1ScopeFromJSONTyped, + ControllerApiResourcesScopesV1ScopeToJSON, + ControllerApiResourcesScopesV1ScopeToJSONTyped, +} from './ControllerApiResourcesScopesV1Scope'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateScopeResponse + */ +export interface ControllerApiServicesV1UpdateScopeResponse { + /** + * + * @type {ControllerApiResourcesScopesV1Scope} + * @memberof ControllerApiServicesV1UpdateScopeResponse + */ + item?: ControllerApiResourcesScopesV1Scope; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateScopeResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateScopeResponse(value: object): value is ControllerApiServicesV1UpdateScopeResponse { + return true; +} + +export function ControllerApiServicesV1UpdateScopeResponseFromJSON(json: any): ControllerApiServicesV1UpdateScopeResponse { + return ControllerApiServicesV1UpdateScopeResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateScopeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateScopeResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesScopesV1ScopeFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateScopeResponseToJSON(json: any): ControllerApiServicesV1UpdateScopeResponse { + return ControllerApiServicesV1UpdateScopeResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateScopeResponseToJSONTyped(value?: ControllerApiServicesV1UpdateScopeResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesScopesV1ScopeToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateStorageBucketResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateStorageBucketResponse.ts new file mode 100644 index 000000000..74844fa27 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateStorageBucketResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesStoragebucketsV1StorageBucket } from './ControllerApiResourcesStoragebucketsV1StorageBucket'; +import { + ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON, + ControllerApiResourcesStoragebucketsV1StorageBucketFromJSONTyped, + ControllerApiResourcesStoragebucketsV1StorageBucketToJSON, + ControllerApiResourcesStoragebucketsV1StorageBucketToJSONTyped, +} from './ControllerApiResourcesStoragebucketsV1StorageBucket'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateStorageBucketResponse + */ +export interface ControllerApiServicesV1UpdateStorageBucketResponse { + /** + * + * @type {ControllerApiResourcesStoragebucketsV1StorageBucket} + * @memberof ControllerApiServicesV1UpdateStorageBucketResponse + */ + item?: ControllerApiResourcesStoragebucketsV1StorageBucket; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateStorageBucketResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateStorageBucketResponse(value: object): value is ControllerApiServicesV1UpdateStorageBucketResponse { + return true; +} + +export function ControllerApiServicesV1UpdateStorageBucketResponseFromJSON(json: any): ControllerApiServicesV1UpdateStorageBucketResponse { + return ControllerApiServicesV1UpdateStorageBucketResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateStorageBucketResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateStorageBucketResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateStorageBucketResponseToJSON(json: any): ControllerApiServicesV1UpdateStorageBucketResponse { + return ControllerApiServicesV1UpdateStorageBucketResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateStorageBucketResponseToJSONTyped(value?: ControllerApiServicesV1UpdateStorageBucketResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesStoragebucketsV1StorageBucketToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateTargetResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateTargetResponse.ts new file mode 100644 index 000000000..8678090ce --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateTargetResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target'; +import { + ControllerApiResourcesTargetsV1TargetFromJSON, + ControllerApiResourcesTargetsV1TargetFromJSONTyped, + ControllerApiResourcesTargetsV1TargetToJSON, + ControllerApiResourcesTargetsV1TargetToJSONTyped, +} from './ControllerApiResourcesTargetsV1Target'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateTargetResponse + */ +export interface ControllerApiServicesV1UpdateTargetResponse { + /** + * + * @type {ControllerApiResourcesTargetsV1Target} + * @memberof ControllerApiServicesV1UpdateTargetResponse + */ + item?: ControllerApiResourcesTargetsV1Target; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateTargetResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateTargetResponse(value: object): value is ControllerApiServicesV1UpdateTargetResponse { + return true; +} + +export function ControllerApiServicesV1UpdateTargetResponseFromJSON(json: any): ControllerApiServicesV1UpdateTargetResponse { + return ControllerApiServicesV1UpdateTargetResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateTargetResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateTargetResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateTargetResponseToJSON(json: any): ControllerApiServicesV1UpdateTargetResponse { + return ControllerApiServicesV1UpdateTargetResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateTargetResponseToJSONTyped(value?: ControllerApiServicesV1UpdateTargetResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateUserResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateUserResponse.ts new file mode 100644 index 000000000..3c6e04043 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateUserResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesUsersV1User } from './ControllerApiResourcesUsersV1User'; +import { + ControllerApiResourcesUsersV1UserFromJSON, + ControllerApiResourcesUsersV1UserFromJSONTyped, + ControllerApiResourcesUsersV1UserToJSON, + ControllerApiResourcesUsersV1UserToJSONTyped, +} from './ControllerApiResourcesUsersV1User'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateUserResponse + */ +export interface ControllerApiServicesV1UpdateUserResponse { + /** + * + * @type {ControllerApiResourcesUsersV1User} + * @memberof ControllerApiServicesV1UpdateUserResponse + */ + item?: ControllerApiResourcesUsersV1User; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateUserResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateUserResponse(value: object): value is ControllerApiServicesV1UpdateUserResponse { + return true; +} + +export function ControllerApiServicesV1UpdateUserResponseFromJSON(json: any): ControllerApiServicesV1UpdateUserResponse { + return ControllerApiServicesV1UpdateUserResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateUserResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateUserResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesUsersV1UserFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateUserResponseToJSON(json: any): ControllerApiServicesV1UpdateUserResponse { + return ControllerApiServicesV1UpdateUserResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateUserResponseToJSONTyped(value?: ControllerApiServicesV1UpdateUserResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesUsersV1UserToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UpdateWorkerResponse.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateWorkerResponse.ts new file mode 100644 index 000000000..c2cb83a74 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UpdateWorkerResponse.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiResourcesWorkersV1Worker } from './ControllerApiResourcesWorkersV1Worker'; +import { + ControllerApiResourcesWorkersV1WorkerFromJSON, + ControllerApiResourcesWorkersV1WorkerFromJSONTyped, + ControllerApiResourcesWorkersV1WorkerToJSON, + ControllerApiResourcesWorkersV1WorkerToJSONTyped, +} from './ControllerApiResourcesWorkersV1Worker'; + +/** + * + * @export + * @interface ControllerApiServicesV1UpdateWorkerResponse + */ +export interface ControllerApiServicesV1UpdateWorkerResponse { + /** + * + * @type {ControllerApiResourcesWorkersV1Worker} + * @memberof ControllerApiServicesV1UpdateWorkerResponse + */ + item?: ControllerApiResourcesWorkersV1Worker; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UpdateWorkerResponse interface. + */ +export function instanceOfControllerApiServicesV1UpdateWorkerResponse(value: object): value is ControllerApiServicesV1UpdateWorkerResponse { + return true; +} + +export function ControllerApiServicesV1UpdateWorkerResponseFromJSON(json: any): ControllerApiServicesV1UpdateWorkerResponse { + return ControllerApiServicesV1UpdateWorkerResponseFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateWorkerResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UpdateWorkerResponse { + if (json == null) { + return json; + } + return { + + 'item': json['item'] == null ? undefined : ControllerApiResourcesWorkersV1WorkerFromJSON(json['item']), + }; +} + +export function ControllerApiServicesV1UpdateWorkerResponseToJSON(json: any): ControllerApiServicesV1UpdateWorkerResponse { + return ControllerApiServicesV1UpdateWorkerResponseToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UpdateWorkerResponseToJSONTyped(value?: ControllerApiServicesV1UpdateWorkerResponse | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'item': ControllerApiResourcesWorkersV1WorkerToJSON(value['item']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UserServiceAddUserAccountsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UserServiceAddUserAccountsBody.ts new file mode 100644 index 000000000..d34f50f3b --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UserServiceAddUserAccountsBody.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1UserServiceAddUserAccountsBody + */ +export interface ControllerApiServicesV1UserServiceAddUserAccountsBody { + /** + * The version ensures the User hasn't changed since it was last retrieved and if it has the request will fail. + * @type {number} + * @memberof ControllerApiServicesV1UserServiceAddUserAccountsBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1UserServiceAddUserAccountsBody + */ + accountIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UserServiceAddUserAccountsBody interface. + */ +export function instanceOfControllerApiServicesV1UserServiceAddUserAccountsBody(value: object): value is ControllerApiServicesV1UserServiceAddUserAccountsBody { + return true; +} + +export function ControllerApiServicesV1UserServiceAddUserAccountsBodyFromJSON(json: any): ControllerApiServicesV1UserServiceAddUserAccountsBody { + return ControllerApiServicesV1UserServiceAddUserAccountsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UserServiceAddUserAccountsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UserServiceAddUserAccountsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'accountIds': json['account_ids'] == null ? undefined : json['account_ids'], + }; +} + +export function ControllerApiServicesV1UserServiceAddUserAccountsBodyToJSON(json: any): ControllerApiServicesV1UserServiceAddUserAccountsBody { + return ControllerApiServicesV1UserServiceAddUserAccountsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UserServiceAddUserAccountsBodyToJSONTyped(value?: ControllerApiServicesV1UserServiceAddUserAccountsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'account_ids': value['accountIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UserServiceRemoveUserAccountsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UserServiceRemoveUserAccountsBody.ts new file mode 100644 index 000000000..fd87a3482 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UserServiceRemoveUserAccountsBody.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1UserServiceRemoveUserAccountsBody + */ +export interface ControllerApiServicesV1UserServiceRemoveUserAccountsBody { + /** + * The version ensures the User hasn't changed since it was last retrieved and if it has the request will fail. + * @type {number} + * @memberof ControllerApiServicesV1UserServiceRemoveUserAccountsBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1UserServiceRemoveUserAccountsBody + */ + accountIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UserServiceRemoveUserAccountsBody interface. + */ +export function instanceOfControllerApiServicesV1UserServiceRemoveUserAccountsBody(value: object): value is ControllerApiServicesV1UserServiceRemoveUserAccountsBody { + return true; +} + +export function ControllerApiServicesV1UserServiceRemoveUserAccountsBodyFromJSON(json: any): ControllerApiServicesV1UserServiceRemoveUserAccountsBody { + return ControllerApiServicesV1UserServiceRemoveUserAccountsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UserServiceRemoveUserAccountsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UserServiceRemoveUserAccountsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'accountIds': json['account_ids'] == null ? undefined : json['account_ids'], + }; +} + +export function ControllerApiServicesV1UserServiceRemoveUserAccountsBodyToJSON(json: any): ControllerApiServicesV1UserServiceRemoveUserAccountsBody { + return ControllerApiServicesV1UserServiceRemoveUserAccountsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UserServiceRemoveUserAccountsBodyToJSONTyped(value?: ControllerApiServicesV1UserServiceRemoveUserAccountsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'account_ids': value['accountIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1UserServiceSetUserAccountsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1UserServiceSetUserAccountsBody.ts new file mode 100644 index 000000000..8cb9b6f3a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1UserServiceSetUserAccountsBody.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1UserServiceSetUserAccountsBody + */ +export interface ControllerApiServicesV1UserServiceSetUserAccountsBody { + /** + * The version ensures the User hasn't changed since it was last retrieved and if it has the request will fail. + * @type {number} + * @memberof ControllerApiServicesV1UserServiceSetUserAccountsBody + */ + version?: number; + /** + * + * @type {Array} + * @memberof ControllerApiServicesV1UserServiceSetUserAccountsBody + */ + accountIds?: Array; +} + +/** + * Check if a given object implements the ControllerApiServicesV1UserServiceSetUserAccountsBody interface. + */ +export function instanceOfControllerApiServicesV1UserServiceSetUserAccountsBody(value: object): value is ControllerApiServicesV1UserServiceSetUserAccountsBody { + return true; +} + +export function ControllerApiServicesV1UserServiceSetUserAccountsBodyFromJSON(json: any): ControllerApiServicesV1UserServiceSetUserAccountsBody { + return ControllerApiServicesV1UserServiceSetUserAccountsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1UserServiceSetUserAccountsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1UserServiceSetUserAccountsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'accountIds': json['account_ids'] == null ? undefined : json['account_ids'], + }; +} + +export function ControllerApiServicesV1UserServiceSetUserAccountsBodyToJSON(json: any): ControllerApiServicesV1UserServiceSetUserAccountsBody { + return ControllerApiServicesV1UserServiceSetUserAccountsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1UserServiceSetUserAccountsBodyToJSONTyped(value?: ControllerApiServicesV1UserServiceSetUserAccountsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'account_ids': value['accountIds'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceAddWorkerTagsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceAddWorkerTagsBody.ts new file mode 100644 index 000000000..df0df7f6a --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceAddWorkerTagsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1WorkerServiceAddWorkerTagsBody + */ +export interface ControllerApiServicesV1WorkerServiceAddWorkerTagsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1WorkerServiceAddWorkerTagsBody + */ + version?: number; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof ControllerApiServicesV1WorkerServiceAddWorkerTagsBody + */ + apiTags?: { [key: string]: Array; }; +} + +/** + * Check if a given object implements the ControllerApiServicesV1WorkerServiceAddWorkerTagsBody interface. + */ +export function instanceOfControllerApiServicesV1WorkerServiceAddWorkerTagsBody(value: object): value is ControllerApiServicesV1WorkerServiceAddWorkerTagsBody { + return true; +} + +export function ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyFromJSON(json: any): ControllerApiServicesV1WorkerServiceAddWorkerTagsBody { + return ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1WorkerServiceAddWorkerTagsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'apiTags': json['api_tags'] == null ? undefined : json['api_tags'], + }; +} + +export function ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyToJSON(json: any): ControllerApiServicesV1WorkerServiceAddWorkerTagsBody { + return ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyToJSONTyped(value?: ControllerApiServicesV1WorkerServiceAddWorkerTagsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'api_tags': value['apiTags'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody.ts new file mode 100644 index 000000000..574c658c4 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody + */ +export interface ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody + */ + version?: number; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody + */ + apiTags?: { [key: string]: Array; }; +} + +/** + * Check if a given object implements the ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody interface. + */ +export function instanceOfControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody(value: object): value is ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody { + return true; +} + +export function ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyFromJSON(json: any): ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody { + return ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'apiTags': json['api_tags'] == null ? undefined : json['api_tags'], + }; +} + +export function ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyToJSON(json: any): ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody { + return ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyToJSONTyped(value?: ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'api_tags': value['apiTags'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceSetWorkerTagsBody.ts b/e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceSetWorkerTagsBody.ts new file mode 100644 index 000000000..0388aac81 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiServicesV1WorkerServiceSetWorkerTagsBody.ts @@ -0,0 +1,74 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ControllerApiServicesV1WorkerServiceSetWorkerTagsBody + */ +export interface ControllerApiServicesV1WorkerServiceSetWorkerTagsBody { + /** + * Version is used to ensure this resource has not changed. + * The mutation will fail if the version does not match the latest known good version. + * @type {number} + * @memberof ControllerApiServicesV1WorkerServiceSetWorkerTagsBody + */ + version?: number; + /** + * + * @type {{ [key: string]: Array; }} + * @memberof ControllerApiServicesV1WorkerServiceSetWorkerTagsBody + */ + apiTags?: { [key: string]: Array; }; +} + +/** + * Check if a given object implements the ControllerApiServicesV1WorkerServiceSetWorkerTagsBody interface. + */ +export function instanceOfControllerApiServicesV1WorkerServiceSetWorkerTagsBody(value: object): value is ControllerApiServicesV1WorkerServiceSetWorkerTagsBody { + return true; +} + +export function ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyFromJSON(json: any): ControllerApiServicesV1WorkerServiceSetWorkerTagsBody { + return ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyFromJSONTyped(json, false); +} + +export function ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1WorkerServiceSetWorkerTagsBody { + if (json == null) { + return json; + } + return { + + 'version': json['version'] == null ? undefined : json['version'], + 'apiTags': json['api_tags'] == null ? undefined : json['api_tags'], + }; +} + +export function ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyToJSON(json: any): ControllerApiServicesV1WorkerServiceSetWorkerTagsBody { + return ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyToJSONTyped(json, false); +} + +export function ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyToJSONTyped(value?: ControllerApiServicesV1WorkerServiceSetWorkerTagsBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'version': value['version'], + 'api_tags': value['apiTags'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiV1Error.ts b/e2e-tests/api-client/models/ControllerApiV1Error.ts new file mode 100644 index 000000000..92fc3ca6c --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiV1Error.ts @@ -0,0 +1,97 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiV1ErrorDetails } from './ControllerApiV1ErrorDetails'; +import { + ControllerApiV1ErrorDetailsFromJSON, + ControllerApiV1ErrorDetailsFromJSONTyped, + ControllerApiV1ErrorDetailsToJSON, + ControllerApiV1ErrorDetailsToJSONTyped, +} from './ControllerApiV1ErrorDetails'; + +/** + * Error is returned by the JSON API when an error occurs. + * @export + * @interface ControllerApiV1Error + */ +export interface ControllerApiV1Error { + /** + * The kind of error this is. + * @type {string} + * @memberof ControllerApiV1Error + */ + kind?: string; + /** + * An string indicating what operation was being run when the error was returned. + * @type {string} + * @memberof ControllerApiV1Error + */ + op?: string; + /** + * A human-readable explanation specific to this occurrence of the error. + * @type {string} + * @memberof ControllerApiV1Error + */ + message?: string; + /** + * + * @type {ControllerApiV1ErrorDetails} + * @memberof ControllerApiV1Error + */ + details?: ControllerApiV1ErrorDetails; +} + +/** + * Check if a given object implements the ControllerApiV1Error interface. + */ +export function instanceOfControllerApiV1Error(value: object): value is ControllerApiV1Error { + return true; +} + +export function ControllerApiV1ErrorFromJSON(json: any): ControllerApiV1Error { + return ControllerApiV1ErrorFromJSONTyped(json, false); +} + +export function ControllerApiV1ErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiV1Error { + if (json == null) { + return json; + } + return { + + 'kind': json['kind'] == null ? undefined : json['kind'], + 'op': json['op'] == null ? undefined : json['op'], + 'message': json['message'] == null ? undefined : json['message'], + 'details': json['details'] == null ? undefined : ControllerApiV1ErrorDetailsFromJSON(json['details']), + }; +} + +export function ControllerApiV1ErrorToJSON(json: any): ControllerApiV1Error { + return ControllerApiV1ErrorToJSONTyped(json, false); +} + +export function ControllerApiV1ErrorToJSONTyped(value?: ControllerApiV1Error | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'kind': value['kind'], + 'op': value['op'], + 'message': value['message'], + 'details': ControllerApiV1ErrorDetailsToJSON(value['details']), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiV1ErrorDetails.ts b/e2e-tests/api-client/models/ControllerApiV1ErrorDetails.ts new file mode 100644 index 000000000..38c4b2682 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiV1ErrorDetails.ts @@ -0,0 +1,88 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ControllerApiV1WrappedError } from './ControllerApiV1WrappedError'; +import { + ControllerApiV1WrappedErrorFromJSON, + ControllerApiV1WrappedErrorFromJSONTyped, + ControllerApiV1WrappedErrorToJSON, + ControllerApiV1WrappedErrorToJSONTyped, +} from './ControllerApiV1WrappedError'; +import type { ControllerApiV1FieldError } from './ControllerApiV1FieldError'; +import { + ControllerApiV1FieldErrorFromJSON, + ControllerApiV1FieldErrorFromJSONTyped, + ControllerApiV1FieldErrorToJSON, + ControllerApiV1FieldErrorToJSONTyped, +} from './ControllerApiV1FieldError'; + +/** + * Additional details regarding a specific error. + * @export + * @interface ControllerApiV1ErrorDetails + */ +export interface ControllerApiV1ErrorDetails { + /** + * Request-field-specific error details. + * @type {Array} + * @memberof ControllerApiV1ErrorDetails + */ + requestFields?: Array; + /** + * The errors that were wrapped in the backend for this returned error. + * @type {Array} + * @memberof ControllerApiV1ErrorDetails + */ + wrappedErrors?: Array; +} + +/** + * Check if a given object implements the ControllerApiV1ErrorDetails interface. + */ +export function instanceOfControllerApiV1ErrorDetails(value: object): value is ControllerApiV1ErrorDetails { + return true; +} + +export function ControllerApiV1ErrorDetailsFromJSON(json: any): ControllerApiV1ErrorDetails { + return ControllerApiV1ErrorDetailsFromJSONTyped(json, false); +} + +export function ControllerApiV1ErrorDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiV1ErrorDetails { + if (json == null) { + return json; + } + return { + + 'requestFields': json['request_fields'] == null ? undefined : ((json['request_fields'] as Array).map(ControllerApiV1FieldErrorFromJSON)), + 'wrappedErrors': json['wrapped_errors'] == null ? undefined : ((json['wrapped_errors'] as Array).map(ControllerApiV1WrappedErrorFromJSON)), + }; +} + +export function ControllerApiV1ErrorDetailsToJSON(json: any): ControllerApiV1ErrorDetails { + return ControllerApiV1ErrorDetailsToJSONTyped(json, false); +} + +export function ControllerApiV1ErrorDetailsToJSONTyped(value?: ControllerApiV1ErrorDetails | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'request_fields': value['requestFields'] == null ? undefined : ((value['requestFields'] as Array).map(ControllerApiV1FieldErrorToJSON)), + 'wrapped_errors': value['wrappedErrors'] == null ? undefined : ((value['wrappedErrors'] as Array).map(ControllerApiV1WrappedErrorToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiV1FieldError.ts b/e2e-tests/api-client/models/ControllerApiV1FieldError.ts new file mode 100644 index 000000000..da6f3ea95 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiV1FieldError.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * FieldErrors contains error information on a per field basis. + * @export + * @interface ControllerApiV1FieldError + */ +export interface ControllerApiV1FieldError { + /** + * The name of the field. + * @type {string} + * @memberof ControllerApiV1FieldError + */ + name?: string; + /** + * The description of the error. + * @type {string} + * @memberof ControllerApiV1FieldError + */ + description?: string; +} + +/** + * Check if a given object implements the ControllerApiV1FieldError interface. + */ +export function instanceOfControllerApiV1FieldError(value: object): value is ControllerApiV1FieldError { + return true; +} + +export function ControllerApiV1FieldErrorFromJSON(json: any): ControllerApiV1FieldError { + return ControllerApiV1FieldErrorFromJSONTyped(json, false); +} + +export function ControllerApiV1FieldErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiV1FieldError { + if (json == null) { + return json; + } + return { + + 'name': json['name'] == null ? undefined : json['name'], + 'description': json['description'] == null ? undefined : json['description'], + }; +} + +export function ControllerApiV1FieldErrorToJSON(json: any): ControllerApiV1FieldError { + return ControllerApiV1FieldErrorToJSONTyped(json, false); +} + +export function ControllerApiV1FieldErrorToJSONTyped(value?: ControllerApiV1FieldError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'name': value['name'], + 'description': value['description'], + }; +} + diff --git a/e2e-tests/api-client/models/ControllerApiV1WrappedError.ts b/e2e-tests/api-client/models/ControllerApiV1WrappedError.ts new file mode 100644 index 000000000..9878ef110 --- /dev/null +++ b/e2e-tests/api-client/models/ControllerApiV1WrappedError.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * Error information relevant to an error that was wrapped by the backend. + * @export + * @interface ControllerApiV1WrappedError + */ +export interface ControllerApiV1WrappedError { + /** + * A string indicating what operation was being run when the wrapped error occurred. + * @type {string} + * @memberof ControllerApiV1WrappedError + */ + op?: string; + /** + * The wrapped error message. + * @type {string} + * @memberof ControllerApiV1WrappedError + */ + message?: string; +} + +/** + * Check if a given object implements the ControllerApiV1WrappedError interface. + */ +export function instanceOfControllerApiV1WrappedError(value: object): value is ControllerApiV1WrappedError { + return true; +} + +export function ControllerApiV1WrappedErrorFromJSON(json: any): ControllerApiV1WrappedError { + return ControllerApiV1WrappedErrorFromJSONTyped(json, false); +} + +export function ControllerApiV1WrappedErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiV1WrappedError { + if (json == null) { + return json; + } + return { + + 'op': json['op'] == null ? undefined : json['op'], + 'message': json['message'] == null ? undefined : json['message'], + }; +} + +export function ControllerApiV1WrappedErrorToJSON(json: any): ControllerApiV1WrappedError { + return ControllerApiV1WrappedErrorToJSONTyped(json, false); +} + +export function ControllerApiV1WrappedErrorToJSONTyped(value?: ControllerApiV1WrappedError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'op': value['op'], + 'message': value['message'], + }; +} + diff --git a/e2e-tests/api-client/models/GoogleApiHttpBody.ts b/e2e-tests/api-client/models/GoogleApiHttpBody.ts new file mode 100644 index 000000000..4f0bdbe6b --- /dev/null +++ b/e2e-tests/api-client/models/GoogleApiHttpBody.ts @@ -0,0 +1,132 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { GoogleProtobufAny } from './GoogleProtobufAny'; +import { + GoogleProtobufAnyFromJSON, + GoogleProtobufAnyFromJSONTyped, + GoogleProtobufAnyToJSON, + GoogleProtobufAnyToJSONTyped, +} from './GoogleProtobufAny'; + +/** + * Message that represents an arbitrary HTTP body. It should only be used for + * payload formats that can't be represented as JSON, such as raw binary or + * an HTML page. + * + * + * This message can be used both in streaming and non-streaming API methods in + * the request as well as the response. + * + * It can be used as a top-level request field, which is convenient if one + * wants to extract parameters from either the URL or HTTP template into the + * request fields and also want access to the raw HTTP body. + * + * Example: + * + * message GetResourceRequest { + * // A unique request id. + * string request_id = 1; + * + * // The raw HTTP body is bound to this field. + * google.api.HttpBody http_body = 2; + * + * } + * + * service ResourceService { + * rpc GetResource(GetResourceRequest) + * returns (google.api.HttpBody); + * rpc UpdateResource(google.api.HttpBody) + * returns (google.protobuf.Empty); + * + * } + * + * Example with streaming methods: + * + * service CaldavService { + * rpc GetCalendar(stream google.api.HttpBody) + * returns (stream google.api.HttpBody); + * rpc UpdateCalendar(stream google.api.HttpBody) + * returns (stream google.api.HttpBody); + * + * } + * + * Use of this type only changes how the request and response bodies are + * handled, all other features will continue to work unchanged. + * @export + * @interface GoogleApiHttpBody + */ +export interface GoogleApiHttpBody { + /** + * The HTTP Content-Type header value specifying the content type of the body. + * @type {string} + * @memberof GoogleApiHttpBody + */ + contentType?: string; + /** + * The HTTP request/response body as raw binary. + * @type {string} + * @memberof GoogleApiHttpBody + */ + data?: string; + /** + * Application specific response metadata. Must be set in the first response + * for streaming APIs. + * @type {Array} + * @memberof GoogleApiHttpBody + */ + extensions?: Array; +} + +/** + * Check if a given object implements the GoogleApiHttpBody interface. + */ +export function instanceOfGoogleApiHttpBody(value: object): value is GoogleApiHttpBody { + return true; +} + +export function GoogleApiHttpBodyFromJSON(json: any): GoogleApiHttpBody { + return GoogleApiHttpBodyFromJSONTyped(json, false); +} + +export function GoogleApiHttpBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleApiHttpBody { + if (json == null) { + return json; + } + return { + + 'contentType': json['content_type'] == null ? undefined : json['content_type'], + 'data': json['data'] == null ? undefined : json['data'], + 'extensions': json['extensions'] == null ? undefined : ((json['extensions'] as Array).map(GoogleProtobufAnyFromJSON)), + }; +} + +export function GoogleApiHttpBodyToJSON(json: any): GoogleApiHttpBody { + return GoogleApiHttpBodyToJSONTyped(json, false); +} + +export function GoogleApiHttpBodyToJSONTyped(value?: GoogleApiHttpBody | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'content_type': value['contentType'], + 'data': value['data'], + 'extensions': value['extensions'] == null ? undefined : ((value['extensions'] as Array).map(GoogleProtobufAnyToJSON)), + }; +} + diff --git a/e2e-tests/api-client/models/GoogleProtobufAny.ts b/e2e-tests/api-client/models/GoogleProtobufAny.ts new file mode 100644 index 000000000..76ac79c67 --- /dev/null +++ b/e2e-tests/api-client/models/GoogleProtobufAny.ts @@ -0,0 +1,178 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * `Any` contains an arbitrary serialized protocol buffer message along with a + * URL that describes the type of the serialized message. + * + * Protobuf library provides support to pack/unpack Any values in the form + * of utility functions or additional generated methods of the Any type. + * + * Example 1: Pack and unpack a message in C++. + * + * Foo foo = ...; + * Any any; + * any.PackFrom(foo); + * ... + * if (any.UnpackTo(&foo)) { + * ... + * } + * + * Example 2: Pack and unpack a message in Java. + * + * Foo foo = ...; + * Any any = Any.pack(foo); + * ... + * if (any.is(Foo.class)) { + * foo = any.unpack(Foo.class); + * } + * // or ... + * if (any.isSameTypeAs(Foo.getDefaultInstance())) { + * foo = any.unpack(Foo.getDefaultInstance()); + * } + * + * Example 3: Pack and unpack a message in Python. + * + * foo = Foo(...) + * any = Any() + * any.Pack(foo) + * ... + * if any.Is(Foo.DESCRIPTOR): + * any.Unpack(foo) + * ... + * + * Example 4: Pack and unpack a message in Go + * + * foo := &pb.Foo{...} + * any, err := anypb.New(foo) + * if err != nil { + * ... + * } + * ... + * foo := &pb.Foo{} + * if err := any.UnmarshalTo(foo); err != nil { + * ... + * } + * + * The pack methods provided by protobuf library will by default use + * 'type.googleapis.com/full.type.name' as the type URL and the unpack + * methods only use the fully qualified type name after the last '/' + * in the type URL, for example "foo.bar.com/x/y.z" will yield type + * name "y.z". + * + * JSON + * + * The JSON representation of an `Any` value uses the regular + * representation of the deserialized, embedded message, with an + * additional field `@type` which contains the type URL. Example: + * + * package google.profile; + * message Person { + * string first_name = 1; + * string last_name = 2; + * } + * + * { + * "@type": "type.googleapis.com/google.profile.Person", + * "firstName": , + * "lastName": + * } + * + * If the embedded message type is well-known and has a custom JSON + * representation, that representation will be embedded adding a field + * `value` which holds the custom JSON in addition to the `@type` + * field. Example (for message [google.protobuf.Duration][]): + * + * { + * "@type": "type.googleapis.com/google.protobuf.Duration", + * "value": "1.212s" + * } + * @export + * @interface GoogleProtobufAny + */ +export interface GoogleProtobufAny { + [key: string]: object | any; + /** + * A URL/resource name that uniquely identifies the type of the serialized + * protocol buffer message. This string must contain at least + * one "/" character. The last segment of the URL's path must represent + * the fully qualified name of the type (as in + * `path/google.protobuf.Duration`). The name should be in a canonical form + * (e.g., leading "." is not accepted). + * + * In practice, teams usually precompile into the binary all types that they + * expect it to use in the context of Any. However, for URLs which use the + * scheme `http`, `https`, or no scheme, one can optionally set up a type + * server that maps type URLs to message definitions as follows: + * + * * If no scheme is provided, `https` is assumed. + * * An HTTP GET on the URL must yield a [google.protobuf.Type][] + * value in binary format, or produce an error. + * * Applications are allowed to cache lookup results based on the + * URL, or have them precompiled into a binary to avoid any + * lookup. Therefore, binary compatibility needs to be preserved + * on changes to types. (Use versioned type names to manage + * breaking changes.) + * + * Note: this functionality is not currently available in the official + * protobuf release, and it is not used for type URLs beginning with + * type.googleapis.com. + * + * Schemes other than `http`, `https` (or the empty scheme) might be + * used with implementation specific semantics. + * @type {string} + * @memberof GoogleProtobufAny + */ + type?: string; +} + +/** + * Check if a given object implements the GoogleProtobufAny interface. + */ +export function instanceOfGoogleProtobufAny(value: object): value is GoogleProtobufAny { + return true; +} + +export function GoogleProtobufAnyFromJSON(json: any): GoogleProtobufAny { + return GoogleProtobufAnyFromJSONTyped(json, false); +} + +export function GoogleProtobufAnyFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleProtobufAny { + if (json == null) { + return json; + } + return { + + ...json, + 'type': json['@type'] == null ? undefined : json['@type'], + }; +} + +export function GoogleProtobufAnyToJSON(json: any): GoogleProtobufAny { + return GoogleProtobufAnyToJSONTyped(json, false); +} + +export function GoogleProtobufAnyToJSONTyped(value?: GoogleProtobufAny | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + '@type': value['type'], + }; +} + diff --git a/e2e-tests/api-client/models/GoogleProtobufNullValue.ts b/e2e-tests/api-client/models/GoogleProtobufNullValue.ts new file mode 100644 index 000000000..fa2435cbd --- /dev/null +++ b/e2e-tests/api-client/models/GoogleProtobufNullValue.ts @@ -0,0 +1,57 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * `NullValue` is a singleton enumeration to represent the null value for the + * `Value` type union. + * + * The JSON representation for `NullValue` is JSON `null`. + * + * - NULL_VALUE: Null value. + * @export + */ +export const GoogleProtobufNullValue = { + NullValue: 'NULL_VALUE' +} as const; +export type GoogleProtobufNullValue = typeof GoogleProtobufNullValue[keyof typeof GoogleProtobufNullValue]; + + +export function instanceOfGoogleProtobufNullValue(value: any): boolean { + for (const key in GoogleProtobufNullValue) { + if (Object.prototype.hasOwnProperty.call(GoogleProtobufNullValue, key)) { + if (GoogleProtobufNullValue[key as keyof typeof GoogleProtobufNullValue] === value) { + return true; + } + } + } + return false; +} + +export function GoogleProtobufNullValueFromJSON(json: any): GoogleProtobufNullValue { + return GoogleProtobufNullValueFromJSONTyped(json, false); +} + +export function GoogleProtobufNullValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): GoogleProtobufNullValue { + return json as GoogleProtobufNullValue; +} + +export function GoogleProtobufNullValueToJSON(value?: GoogleProtobufNullValue | null): any { + return value as any; +} + +export function GoogleProtobufNullValueToJSONTyped(value: any, ignoreDiscriminator: boolean): GoogleProtobufNullValue { + return value as GoogleProtobufNullValue; +} + diff --git a/e2e-tests/api-client/models/index.ts b/e2e-tests/api-client/models/index.ts new file mode 100644 index 000000000..1d8e5a29c --- /dev/null +++ b/e2e-tests/api-client/models/index.ts @@ -0,0 +1,224 @@ +/* tslint:disable */ +/* eslint-disable */ +export * from './ControllerApiResourcesAccountsV1Account'; +export * from './ControllerApiResourcesAliasesV1Alias'; +export * from './ControllerApiResourcesAuthmethodsV1AuthMethod'; +export * from './ControllerApiResourcesAuthtokensV1AuthToken'; +export * from './ControllerApiResourcesBillingV1ActiveUsers'; +export * from './ControllerApiResourcesCredentiallibrariesV1CredentialLibrary'; +export * from './ControllerApiResourcesCredentialsV1Credential'; +export * from './ControllerApiResourcesCredentialstoresV1CredentialStore'; +export * from './ControllerApiResourcesGroupsV1Group'; +export * from './ControllerApiResourcesGroupsV1Member'; +export * from './ControllerApiResourcesHostcatalogsV1HostCatalog'; +export * from './ControllerApiResourcesHostsV1Host'; +export * from './ControllerApiResourcesHostsetsV1HostSet'; +export * from './ControllerApiResourcesManagedgroupsV1ManagedGroup'; +export * from './ControllerApiResourcesPluginsV1PluginInfo'; +export * from './ControllerApiResourcesPoliciesV1Policy'; +export * from './ControllerApiResourcesRolesV1Grant'; +export * from './ControllerApiResourcesRolesV1GrantJson'; +export * from './ControllerApiResourcesRolesV1Principal'; +export * from './ControllerApiResourcesRolesV1Role'; +export * from './ControllerApiResourcesScopesV1Key'; +export * from './ControllerApiResourcesScopesV1KeyVersion'; +export * from './ControllerApiResourcesScopesV1KeyVersionDestructionJob'; +export * from './ControllerApiResourcesScopesV1Scope'; +export * from './ControllerApiResourcesScopesV1ScopeInfo'; +export * from './ControllerApiResourcesSessionrecordingsV1ChannelRecording'; +export * from './ControllerApiResourcesSessionrecordingsV1ConnectionRecording'; +export * from './ControllerApiResourcesSessionrecordingsV1Credential'; +export * from './ControllerApiResourcesSessionrecordingsV1CredentialLibrary'; +export * from './ControllerApiResourcesSessionrecordingsV1CredentialStore'; +export * from './ControllerApiResourcesSessionrecordingsV1Host'; +export * from './ControllerApiResourcesSessionrecordingsV1HostCatalog'; +export * from './ControllerApiResourcesSessionrecordingsV1SessionRecording'; +export * from './ControllerApiResourcesSessionrecordingsV1Target'; +export * from './ControllerApiResourcesSessionrecordingsV1User'; +export * from './ControllerApiResourcesSessionrecordingsV1ValuesAtTime'; +export * from './ControllerApiResourcesSessionsV1Connection'; +export * from './ControllerApiResourcesSessionsV1Session'; +export * from './ControllerApiResourcesSessionsV1SessionState'; +export * from './ControllerApiResourcesStoragebucketsV1StorageBucket'; +export * from './ControllerApiResourcesTargetsV1Alias'; +export * from './ControllerApiResourcesTargetsV1AuthorizeSessionArguments'; +export * from './ControllerApiResourcesTargetsV1CredentialSource'; +export * from './ControllerApiResourcesTargetsV1HostSource'; +export * from './ControllerApiResourcesTargetsV1SessionAuthorization'; +export * from './ControllerApiResourcesTargetsV1SessionCredential'; +export * from './ControllerApiResourcesTargetsV1SessionSecret'; +export * from './ControllerApiResourcesTargetsV1Target'; +export * from './ControllerApiResourcesTargetsV1TargetAliasAttributes'; +export * from './ControllerApiResourcesUsersV1Account'; +export * from './ControllerApiResourcesUsersV1User'; +export * from './ControllerApiResourcesWorkersV1Certificate'; +export * from './ControllerApiResourcesWorkersV1CertificateAuthority'; +export * from './ControllerApiResourcesWorkersV1RemoteStoragePermissions'; +export * from './ControllerApiResourcesWorkersV1RemoteStorageState'; +export * from './ControllerApiResourcesWorkersV1Worker'; +export * from './ControllerApiServicesV1AccountServiceChangePasswordBody'; +export * from './ControllerApiServicesV1AccountServiceSetPasswordBody'; +export * from './ControllerApiServicesV1AddGroupMembersResponse'; +export * from './ControllerApiServicesV1AddHostSetHostsResponse'; +export * from './ControllerApiServicesV1AddRoleGrantScopesResponse'; +export * from './ControllerApiServicesV1AddRoleGrantsResponse'; +export * from './ControllerApiServicesV1AddRolePrincipalsResponse'; +export * from './ControllerApiServicesV1AddTargetCredentialSourcesResponse'; +export * from './ControllerApiServicesV1AddTargetHostSourcesResponse'; +export * from './ControllerApiServicesV1AddUserAccountsResponse'; +export * from './ControllerApiServicesV1AddWorkerTagsResponse'; +export * from './ControllerApiServicesV1AttachStoragePolicyResponse'; +export * from './ControllerApiServicesV1AuthMethodServiceAuthenticateBody'; +export * from './ControllerApiServicesV1AuthMethodServiceChangeStateBody'; +export * from './ControllerApiServicesV1AuthenticateResponse'; +export * from './ControllerApiServicesV1AuthorizeSessionResponse'; +export * from './ControllerApiServicesV1CancelSessionResponse'; +export * from './ControllerApiServicesV1ChangePasswordResponse'; +export * from './ControllerApiServicesV1ChangeStateResponse'; +export * from './ControllerApiServicesV1CreateAccountResponse'; +export * from './ControllerApiServicesV1CreateAliasResponse'; +export * from './ControllerApiServicesV1CreateAuthMethodResponse'; +export * from './ControllerApiServicesV1CreateControllerLedResponse'; +export * from './ControllerApiServicesV1CreateCredentialLibraryResponse'; +export * from './ControllerApiServicesV1CreateCredentialResponse'; +export * from './ControllerApiServicesV1CreateCredentialStoreResponse'; +export * from './ControllerApiServicesV1CreateGroupResponse'; +export * from './ControllerApiServicesV1CreateHostCatalogResponse'; +export * from './ControllerApiServicesV1CreateHostResponse'; +export * from './ControllerApiServicesV1CreateHostSetResponse'; +export * from './ControllerApiServicesV1CreateManagedGroupResponse'; +export * from './ControllerApiServicesV1CreatePolicyResponse'; +export * from './ControllerApiServicesV1CreateRoleResponse'; +export * from './ControllerApiServicesV1CreateScopeResponse'; +export * from './ControllerApiServicesV1CreateStorageBucketResponse'; +export * from './ControllerApiServicesV1CreateTargetResponse'; +export * from './ControllerApiServicesV1CreateUserResponse'; +export * from './ControllerApiServicesV1CreateWorkerLedResponse'; +export * from './ControllerApiServicesV1DestroyKeyVersionRequest'; +export * from './ControllerApiServicesV1DestroyKeyVersionResponse'; +export * from './ControllerApiServicesV1DetachStoragePolicyResponse'; +export * from './ControllerApiServicesV1GetAccountResponse'; +export * from './ControllerApiServicesV1GetAliasResponse'; +export * from './ControllerApiServicesV1GetAuthMethodResponse'; +export * from './ControllerApiServicesV1GetAuthTokenResponse'; +export * from './ControllerApiServicesV1GetCredentialLibraryResponse'; +export * from './ControllerApiServicesV1GetCredentialResponse'; +export * from './ControllerApiServicesV1GetCredentialStoreResponse'; +export * from './ControllerApiServicesV1GetGroupResponse'; +export * from './ControllerApiServicesV1GetHostCatalogResponse'; +export * from './ControllerApiServicesV1GetHostResponse'; +export * from './ControllerApiServicesV1GetHostSetResponse'; +export * from './ControllerApiServicesV1GetManagedGroupResponse'; +export * from './ControllerApiServicesV1GetPolicyResponse'; +export * from './ControllerApiServicesV1GetRoleResponse'; +export * from './ControllerApiServicesV1GetScopeResponse'; +export * from './ControllerApiServicesV1GetSessionRecordingResponse'; +export * from './ControllerApiServicesV1GetSessionResponse'; +export * from './ControllerApiServicesV1GetStorageBucketResponse'; +export * from './ControllerApiServicesV1GetTargetResponse'; +export * from './ControllerApiServicesV1GetUserResponse'; +export * from './ControllerApiServicesV1GetWorkerResponse'; +export * from './ControllerApiServicesV1GroupServiceAddGroupMembersBody'; +export * from './ControllerApiServicesV1GroupServiceRemoveGroupMembersBody'; +export * from './ControllerApiServicesV1GroupServiceSetGroupMembersBody'; +export * from './ControllerApiServicesV1HostSetServiceAddHostSetHostsBody'; +export * from './ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody'; +export * from './ControllerApiServicesV1HostSetServiceSetHostSetHostsBody'; +export * from './ControllerApiServicesV1ListAccountsResponse'; +export * from './ControllerApiServicesV1ListAliasesResponse'; +export * from './ControllerApiServicesV1ListAuthMethodsResponse'; +export * from './ControllerApiServicesV1ListAuthTokensResponse'; +export * from './ControllerApiServicesV1ListCredentialLibrariesResponse'; +export * from './ControllerApiServicesV1ListCredentialStoresResponse'; +export * from './ControllerApiServicesV1ListCredentialsResponse'; +export * from './ControllerApiServicesV1ListGroupsResponse'; +export * from './ControllerApiServicesV1ListHostCatalogsResponse'; +export * from './ControllerApiServicesV1ListHostSetsResponse'; +export * from './ControllerApiServicesV1ListHostsResponse'; +export * from './ControllerApiServicesV1ListKeyVersionDestructionJobsResponse'; +export * from './ControllerApiServicesV1ListKeysResponse'; +export * from './ControllerApiServicesV1ListManagedGroupsResponse'; +export * from './ControllerApiServicesV1ListPoliciesResponse'; +export * from './ControllerApiServicesV1ListResolvableAliasesResponse'; +export * from './ControllerApiServicesV1ListRolesResponse'; +export * from './ControllerApiServicesV1ListScopesResponse'; +export * from './ControllerApiServicesV1ListSessionRecordingsResponse'; +export * from './ControllerApiServicesV1ListSessionsResponse'; +export * from './ControllerApiServicesV1ListStorageBucketsResponse'; +export * from './ControllerApiServicesV1ListTargetsResponse'; +export * from './ControllerApiServicesV1ListUsersResponse'; +export * from './ControllerApiServicesV1ListWorkersResponse'; +export * from './ControllerApiServicesV1MonthlyActiveUsersResponse'; +export * from './ControllerApiServicesV1ReApplyStoragePolicyResponse'; +export * from './ControllerApiServicesV1ReadCertificateAuthorityResponse'; +export * from './ControllerApiServicesV1ReinitializeCertificateAuthorityResponse'; +export * from './ControllerApiServicesV1RemoveGroupMembersResponse'; +export * from './ControllerApiServicesV1RemoveHostSetHostsResponse'; +export * from './ControllerApiServicesV1RemoveRoleGrantScopesResponse'; +export * from './ControllerApiServicesV1RemoveRoleGrantsResponse'; +export * from './ControllerApiServicesV1RemoveRolePrincipalsResponse'; +export * from './ControllerApiServicesV1RemoveTargetCredentialSourcesResponse'; +export * from './ControllerApiServicesV1RemoveTargetHostSourcesResponse'; +export * from './ControllerApiServicesV1RemoveUserAccountsResponse'; +export * from './ControllerApiServicesV1RemoveWorkerTagsResponse'; +export * from './ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody'; +export * from './ControllerApiServicesV1RoleServiceAddRoleGrantsBody'; +export * from './ControllerApiServicesV1RoleServiceAddRolePrincipalsBody'; +export * from './ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody'; +export * from './ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody'; +export * from './ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody'; +export * from './ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody'; +export * from './ControllerApiServicesV1RoleServiceSetRoleGrantsBody'; +export * from './ControllerApiServicesV1RoleServiceSetRolePrincipalsBody'; +export * from './ControllerApiServicesV1RotateKeysRequest'; +export * from './ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody'; +export * from './ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody'; +export * from './ControllerApiServicesV1SessionServiceCancelSessionBody'; +export * from './ControllerApiServicesV1SetGroupMembersResponse'; +export * from './ControllerApiServicesV1SetHostSetHostsResponse'; +export * from './ControllerApiServicesV1SetPasswordResponse'; +export * from './ControllerApiServicesV1SetRoleGrantScopesResponse'; +export * from './ControllerApiServicesV1SetRoleGrantsResponse'; +export * from './ControllerApiServicesV1SetRolePrincipalsResponse'; +export * from './ControllerApiServicesV1SetTargetCredentialSourcesResponse'; +export * from './ControllerApiServicesV1SetTargetHostSourcesResponse'; +export * from './ControllerApiServicesV1SetUserAccountsResponse'; +export * from './ControllerApiServicesV1SetWorkerTagsResponse'; +export * from './ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody'; +export * from './ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody'; +export * from './ControllerApiServicesV1TargetServiceAuthorizeSessionBody'; +export * from './ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody'; +export * from './ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody'; +export * from './ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody'; +export * from './ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody'; +export * from './ControllerApiServicesV1UpdateAccountResponse'; +export * from './ControllerApiServicesV1UpdateAliasResponse'; +export * from './ControllerApiServicesV1UpdateAuthMethodResponse'; +export * from './ControllerApiServicesV1UpdateCredentialLibraryResponse'; +export * from './ControllerApiServicesV1UpdateCredentialResponse'; +export * from './ControllerApiServicesV1UpdateCredentialStoreResponse'; +export * from './ControllerApiServicesV1UpdateGroupResponse'; +export * from './ControllerApiServicesV1UpdateHostCatalogResponse'; +export * from './ControllerApiServicesV1UpdateHostResponse'; +export * from './ControllerApiServicesV1UpdateHostSetResponse'; +export * from './ControllerApiServicesV1UpdateManagedGroupResponse'; +export * from './ControllerApiServicesV1UpdatePolicyResponse'; +export * from './ControllerApiServicesV1UpdateRoleResponse'; +export * from './ControllerApiServicesV1UpdateScopeResponse'; +export * from './ControllerApiServicesV1UpdateStorageBucketResponse'; +export * from './ControllerApiServicesV1UpdateTargetResponse'; +export * from './ControllerApiServicesV1UpdateUserResponse'; +export * from './ControllerApiServicesV1UpdateWorkerResponse'; +export * from './ControllerApiServicesV1UserServiceAddUserAccountsBody'; +export * from './ControllerApiServicesV1UserServiceRemoveUserAccountsBody'; +export * from './ControllerApiServicesV1UserServiceSetUserAccountsBody'; +export * from './ControllerApiServicesV1WorkerServiceAddWorkerTagsBody'; +export * from './ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody'; +export * from './ControllerApiServicesV1WorkerServiceSetWorkerTagsBody'; +export * from './ControllerApiV1Error'; +export * from './ControllerApiV1ErrorDetails'; +export * from './ControllerApiV1FieldError'; +export * from './ControllerApiV1WrappedError'; +export * from './GoogleApiHttpBody'; +export * from './GoogleProtobufAny'; +export * from './GoogleProtobufNullValue'; diff --git a/e2e-tests/api-client/runtime.ts b/e2e-tests/api-client/runtime.ts new file mode 100644 index 000000000..9ae49e961 --- /dev/null +++ b/e2e-tests/api-client/runtime.ts @@ -0,0 +1,432 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Boundary controller HTTP API + * Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently. + * + * The version of the OpenAPI document: 0.19.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export const BASE_PATH = "https://your-boundary-hostname.com".replace(/\/+$/, ""); + +export interface ConfigurationParameters { + basePath?: string; // override base path + fetchApi?: FetchAPI; // override for fetch implementation + middleware?: Middleware[]; // middleware to apply before/after fetch requests + queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings + username?: string; // parameter for basic security + password?: string; // parameter for basic security + apiKey?: string | Promise | ((name: string) => string | Promise); // parameter for apiKey security + accessToken?: string | Promise | ((name?: string, scopes?: string[]) => string | Promise); // parameter for oauth2 security + headers?: HTTPHeaders; //header params we want to use on every request + credentials?: RequestCredentials; //value for the credentials param we want to use on each request +} + +export class Configuration { + constructor(private configuration: ConfigurationParameters = {}) {} + + set config(configuration: Configuration) { + this.configuration = configuration; + } + + get basePath(): string { + return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; + } + + get fetchApi(): FetchAPI | undefined { + return this.configuration.fetchApi; + } + + get middleware(): Middleware[] { + return this.configuration.middleware || []; + } + + get queryParamsStringify(): (params: HTTPQuery) => string { + return this.configuration.queryParamsStringify || querystring; + } + + get username(): string | undefined { + return this.configuration.username; + } + + get password(): string | undefined { + return this.configuration.password; + } + + get apiKey(): ((name: string) => string | Promise) | undefined { + const apiKey = this.configuration.apiKey; + if (apiKey) { + return typeof apiKey === 'function' ? apiKey : () => apiKey; + } + return undefined; + } + + get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { + const accessToken = this.configuration.accessToken; + if (accessToken) { + return typeof accessToken === 'function' ? accessToken : async () => accessToken; + } + return undefined; + } + + get headers(): HTTPHeaders | undefined { + return this.configuration.headers; + } + + get credentials(): RequestCredentials | undefined { + return this.configuration.credentials; + } +} + +export const DefaultConfig = new Configuration(); + +/** + * This is the base class for all generated API classes. + */ +export class BaseAPI { + + private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); + private middleware: Middleware[]; + + constructor(protected configuration = DefaultConfig) { + this.middleware = configuration.middleware; + } + + withMiddleware(this: T, ...middlewares: Middleware[]) { + const next = this.clone(); + next.middleware = next.middleware.concat(...middlewares); + return next; + } + + withPreMiddleware(this: T, ...preMiddlewares: Array) { + const middlewares = preMiddlewares.map((pre) => ({ pre })); + return this.withMiddleware(...middlewares); + } + + withPostMiddleware(this: T, ...postMiddlewares: Array) { + const middlewares = postMiddlewares.map((post) => ({ post })); + return this.withMiddleware(...middlewares); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + protected isJsonMime(mime: string | null | undefined): boolean { + if (!mime) { + return false; + } + return BaseAPI.jsonRegex.test(mime); + } + + protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { + const { url, init } = await this.createFetchParams(context, initOverrides); + const response = await this.fetchApi(url, init); + if (response && (response.status >= 200 && response.status < 300)) { + return response; + } + throw new ResponseError(response, 'Response returned an error code'); + } + + private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { + let url = this.configuration.basePath + context.path; + if (context.query !== undefined && Object.keys(context.query).length !== 0) { + // only add the querystring to the URL if there are query parameters. + // this is done to avoid urls ending with a "?" character which buggy webservers + // do not handle correctly sometimes. + url += '?' + this.configuration.queryParamsStringify(context.query); + } + + const headers = Object.assign({}, this.configuration.headers, context.headers); + Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); + + const initOverrideFn = + typeof initOverrides === "function" + ? initOverrides + : async () => initOverrides; + + const initParams = { + method: context.method, + headers, + body: context.body, + credentials: this.configuration.credentials, + }; + + const overriddenInit: RequestInit = { + ...initParams, + ...(await initOverrideFn({ + init: initParams, + context, + })) + }; + + let body: any; + if (isFormData(overriddenInit.body) + || (overriddenInit.body instanceof URLSearchParams) + || isBlob(overriddenInit.body)) { + body = overriddenInit.body; + } else if (this.isJsonMime(headers['Content-Type'])) { + body = JSON.stringify(overriddenInit.body); + } else { + body = overriddenInit.body; + } + + const init: RequestInit = { + ...overriddenInit, + body + }; + + return { url, init }; + } + + private fetchApi = async (url: string, init: RequestInit) => { + let fetchParams = { url, init }; + for (const middleware of this.middleware) { + if (middleware.pre) { + fetchParams = await middleware.pre({ + fetch: this.fetchApi, + ...fetchParams, + }) || fetchParams; + } + } + let response: Response | undefined = undefined; + try { + response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); + } catch (e) { + for (const middleware of this.middleware) { + if (middleware.onError) { + response = await middleware.onError({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + error: e, + response: response ? response.clone() : undefined, + }) || response; + } + } + if (response === undefined) { + if (e instanceof Error) { + throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); + } else { + throw e; + } + } + } + for (const middleware of this.middleware) { + if (middleware.post) { + response = await middleware.post({ + fetch: this.fetchApi, + url: fetchParams.url, + init: fetchParams.init, + response: response.clone(), + }) || response; + } + } + return response; + } + + /** + * Create a shallow clone of `this` by constructing a new instance + * and then shallow cloning data members. + */ + private clone(this: T): T { + const constructor = this.constructor as any; + const next = new constructor(this.configuration); + next.middleware = this.middleware.slice(); + return next; + } +}; + +function isBlob(value: any): value is Blob { + return typeof Blob !== 'undefined' && value instanceof Blob; +} + +function isFormData(value: any): value is FormData { + return typeof FormData !== "undefined" && value instanceof FormData; +} + +export class ResponseError extends Error { + override name: "ResponseError" = "ResponseError"; + constructor(public response: Response, msg?: string) { + super(msg); + } +} + +export class FetchError extends Error { + override name: "FetchError" = "FetchError"; + constructor(public cause: Error, msg?: string) { + super(msg); + } +} + +export class RequiredError extends Error { + override name: "RequiredError" = "RequiredError"; + constructor(public field: string, msg?: string) { + super(msg); + } +} + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; + +export type Json = any; +export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; +export type HTTPHeaders = { [key: string]: string }; +export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; +export type HTTPBody = Json | FormData | URLSearchParams; +export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; +export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; + +export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise + +export interface FetchParams { + url: string; + init: RequestInit; +} + +export interface RequestOpts { + path: string; + method: HTTPMethod; + headers: HTTPHeaders; + query?: HTTPQuery; + body?: HTTPBody; +} + +export function querystring(params: HTTPQuery, prefix: string = ''): string { + return Object.keys(params) + .map(key => querystringSingleKey(key, params[key], prefix)) + .filter(part => part.length > 0) + .join('&'); +} + +function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { + const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); + if (value instanceof Array) { + const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) + .join(`&${encodeURIComponent(fullKey)}=`); + return `${encodeURIComponent(fullKey)}=${multiValue}`; + } + if (value instanceof Set) { + const valueAsArray = Array.from(value); + return querystringSingleKey(key, valueAsArray, keyPrefix); + } + if (value instanceof Date) { + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; + } + if (value instanceof Object) { + return querystring(value as HTTPQuery, fullKey); + } + return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; +} + +export function exists(json: any, key: string) { + const value = json[key]; + return value !== null && value !== undefined; +} + +export function mapValues(data: any, fn: (item: any) => any) { + const result: { [key: string]: any } = {}; + for (const key of Object.keys(data)) { + result[key] = fn(data[key]); + } + return result; +} + +export function canConsumeForm(consumes: Consume[]): boolean { + for (const consume of consumes) { + if ('multipart/form-data' === consume.contentType) { + return true; + } + } + return false; +} + +export interface Consume { + contentType: string; +} + +export interface RequestContext { + fetch: FetchAPI; + url: string; + init: RequestInit; +} + +export interface ResponseContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + response: Response; +} + +export interface ErrorContext { + fetch: FetchAPI; + url: string; + init: RequestInit; + error: unknown; + response?: Response; +} + +export interface Middleware { + pre?(context: RequestContext): Promise; + post?(context: ResponseContext): Promise; + onError?(context: ErrorContext): Promise; +} + +export interface ApiResponse { + raw: Response; + value(): Promise; +} + +export interface ResponseTransformer { + (json: any): T; +} + +export class JSONApiResponse { + constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} + + async value(): Promise { + return this.transformer(await this.raw.json()); + } +} + +export class VoidApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return undefined; + } +} + +export class BlobApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.blob(); + }; +} + +export class TextApiResponse { + constructor(public raw: Response) {} + + async value(): Promise { + return await this.raw.text(); + }; +} diff --git a/e2e-tests/global-setup.js b/e2e-tests/global-setup.js index 5bf74fea9..198a54671 100644 --- a/e2e-tests/global-setup.js +++ b/e2e-tests/global-setup.js @@ -3,8 +3,9 @@ * SPDX-License-Identifier: BUSL-1.1 */ -import { chromium, test as baseTest } from '@playwright/test'; +import { chromium, test as baseTest, mergeTests } from '@playwright/test'; import { checkEnv } from './helpers/general.js'; +import { boundaryApiClientTest } from './helpers/boundary-api-client.js'; import { LoginPage } from './admin/pages/login.js'; import path from 'path'; import dotenv from 'dotenv'; @@ -60,7 +61,7 @@ export const authenticatedState = path.resolve( ); // Centralized location for environment variables used in tests -export const test = baseTest.extend({ +export const base = baseTest.extend({ adminAuthMethodId: process.env.E2E_PASSWORD_AUTH_METHOD_ID, adminLoginName: process.env.E2E_PASSWORD_ADMIN_LOGIN_NAME, adminPassword: process.env.E2E_PASSWORD_ADMIN_PASSWORD, @@ -99,3 +100,5 @@ export const test = baseTest.extend({ await use(request); }, }); + +export const test = mergeTests(base, boundaryApiClientTest); diff --git a/e2e-tests/helpers/boundary-api-client.ts b/e2e-tests/helpers/boundary-api-client.ts new file mode 100644 index 000000000..ce82c7451 --- /dev/null +++ b/e2e-tests/helpers/boundary-api-client.ts @@ -0,0 +1,383 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: BUSL-1.1 + */ + +import { test as base } from '@playwright/test'; +import * as BoundaryApiClient from '../api-client'; + +const BoundaryE2EResourceCleanupHeader = 'X-Boundary-E2E-Resource-Cleanup'; + +// These constants represent assumptions around the boundary api +const BoundaryApiStatusCodes = Object.freeze({ + ok: 200, + deleted: 204, + notFound: 404, +}); + +// the openapi spec generated incorrectly specifies that DELETE responses will be a 200 with a json body, +// but they actually return a 204 "No Content" status with no body. The generated api client does not handle +// this correctly, so we need to patch it here so when it tries to access the `json` method on the response +// it does not throw +const patchEmptyResponsesMiddleware = { + async post(context: BoundaryApiClient.ResponseContext) { + const isBoundaryApiDeleteResponse = + context.response.status === BoundaryApiStatusCodes.deleted && + context.response.body === null; + + if (isBoundaryApiDeleteResponse) { + context.response.json = async () => undefined; + } + + return context.response; + }, +}; + +const betterErrorHandlingMiddleware = { + async post(context: BoundaryApiClient.ResponseContext) { + // skip logging of cleanup requests because it is common for the resource to already + // be cleaned up and the result of trying again will be a 404. We only want to log + // requests that fail as part of test or test setup so that they can be debugged + if (context.init.headers?.[BoundaryE2EResourceCleanupHeader] === 'true') { + return; + } + + const responseStatusCodeIsInErrorRange = context.response.status >= 400; + if (responseStatusCodeIsInErrorRange) { + let errorResponseMessage; + + // a response can only be read once, and is read by the generated api client, + // cloning the response allows the cloned response to be read, leaving the + // original response to be read by the generated api client + const clonedResponse = context.response.clone(); + try { + errorResponseMessage = await clonedResponse.text(); + } finally { + console.error( + `Error response from Boundary API, status code: ${clonedResponse.status}, with method: ${context.init.method}, on ${clonedResponse.url}${errorResponseMessage ? `:\n${errorResponseMessage}` : ''}`, + ); + } + } + + return context.response; + }, +}; + +function extractPluralizedResourceTypeFromResourceCreationUrl( + url: string, +): string | undefined { + const match = new URL(url).pathname.match(/^\/v1\/([a-z-]+)$/); + if (!match) return undefined; + + const [_, type] = match; + return type; +} + +class BoundaryApi { + // `createdResources` is keyed by the pluralized resource type, e.g. "roles", "scopes", "targets" + // this is what is exracted from the url in `captureCreatedResourcesMiddleware` + readonly createdResources: Record = {}; + readonly skipCleanupResources: { id: string }[] = []; + + constructor(readonly controllerAddr: string) {} + + get clients() { + const { openapiConfiguration } = this; + + // `clients` could be generated dynamically, but by doing it this way the type annotations are + // better preserved for each client, and the "@link" jsdoc appear in the editor + const clients = { + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/accounts Accounts Documentation} */ + Account: new BoundaryApiClient.AccountServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/aliases Aliases Method Documentation} */ + Alias: new BoundaryApiClient.AliasServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/auth-methods Auth Method Documentation} */ + AuthMethod: new BoundaryApiClient.AuthMethodServiceApi( + openapiConfiguration, + ), + + /** {@link https://developer.hashicorp.com/boundary/api-docs/auth-token-service Auth Token Service Api Docs} */ + AuthToken: new BoundaryApiClient.AuthTokenServiceApi( + openapiConfiguration, + ), + + /** {@link https://developer.hashicorp.com/boundary/api-docs/billing-service Billing Service Api Docs} */ + Billing: new BoundaryApiClient.BillingServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/credential-libraries Credential Libraries Documentation} */ + CredentialLibrary: new BoundaryApiClient.CredentialLibraryServiceApi( + openapiConfiguration, + ), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/credentials Credentials Documentation} */ + Credential: new BoundaryApiClient.CredentialServiceApi( + openapiConfiguration, + ), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/credential-stores Credential Stores Documentation} */ + CredentialStore: new BoundaryApiClient.CredentialStoreServiceApi( + openapiConfiguration, + ), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/groups Groups Documentation} */ + Group: new BoundaryApiClient.GroupServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/hosts Hosts Documentation} */ + Host: new BoundaryApiClient.HostServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/host-catalogs Host Catalogs Documentation} */ + HostCatalog: new BoundaryApiClient.HostCatalogServiceApi( + openapiConfiguration, + ), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/host-sets Host Sets Documentation} */ + HostSet: new BoundaryApiClient.HostSetServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/managed-groups Managed Groups Documentation} */ + ManagedGroup: new BoundaryApiClient.ManagedGroupServiceApi( + openapiConfiguration, + ), + + /** {@link https://developer.hashicorp.com/boundary/api-docs/policy-service Policy Service Api Docs} */ + Policy: new BoundaryApiClient.PolicyServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/roles Roles Documentation} */ + Role: new BoundaryApiClient.RoleServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/scopes Scopes Documentation} */ + Scope: new BoundaryApiClient.ScopeServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/session-recordings Session Recordings Documentation} */ + SessionRecording: new BoundaryApiClient.SessionRecordingServiceApi( + openapiConfiguration, + ), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/sessions Sessions Documentation} */ + Session: new BoundaryApiClient.SessionServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/storage-buckets Storage Buckets Documentation} */ + StorageBucket: new BoundaryApiClient.StorageBucketServiceApi( + openapiConfiguration, + ), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/targets Targets Documentation} */ + Target: new BoundaryApiClient.TargetServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/docs/concepts/domain-model/users Users Documentation} */ + User: new BoundaryApiClient.UserServiceApi(openapiConfiguration), + + /** {@link https://developer.hashicorp.com/boundary/api-docs/worker-service Worker Service Api Docs} */ + Worker: new BoundaryApiClient.WorkerServiceApi(openapiConfiguration), + }; + + return clients; + } + + // it's assumed that ids are unique so the type isn't needed to be known when + // iterating over created resources + skipCleanup(identifiable: { id: string }): void { + if (!identifiable.id) { + throw new Error('The `id` field is expected on the resource'); + } + + this.skipCleanupResources.push(identifiable); + } + + private get openapiConfiguration() { + const { controllerAddr, createdResources: resources } = this; + + const captureCreatedResourcesMiddleware = { + async post(context) { + // only json responses are expected for created resources + if ( + context.response.status !== BoundaryApiStatusCodes.ok || + context.response.headers.get('content-type') !== 'application/json' + ) { + return context.response; + } + + // the response `json` can only be read once, and needs to be read later by the generated api client, + // instead we can clone the response and this allows us to read the `json` on the cloned response only + const json = await context.response.clone().json(); + + // created responses should have a valid "id" field + if (!json.id) { + return context.response; + } + + // the url is the being used to determine the resource type, it returns the type in pluralized form + const pluralizedResourceType = + extractPluralizedResourceTypeFromResourceCreationUrl( + context.response.url, + ); + + if (!pluralizedResourceType) { + return context.response; + } + + resources[pluralizedResourceType] ??= []; + // capture the created json payload, all that's really needed is the `id` and the `type` + // in order to automatically clean it up later + resources[pluralizedResourceType].push(json); + + // return original response + return context.response; + }, + }; + + const openapiConfiguration = new BoundaryApiClient.Configuration({ + basePath: controllerAddr, + headers: { Authorization: `Bearer ${process.env.E2E_TOKEN}` }, + middleware: [ + captureCreatedResourcesMiddleware, + betterErrorHandlingMiddleware, + patchEmptyResponsesMiddleware, + ], + }); + + return openapiConfiguration; + } +} + +export const boundaryApiClientTest = base.extend<{ + apiClient: BoundaryApi; + controllerAddr?: string; + apiClientTestAfter?: () => {}; +}>({ + apiClient: async ({ controllerAddr, apiClientTestAfter }, use) => { + // by destructuring the `apiClientTestAfter` fixture it creates a dependency on that fixture which + // controls the setup/teardown order and allows `api-client.spec.js` to test the teardown cleanup + // of this fixture + apiClientTestAfter; + + if (!controllerAddr) { + throw new Error('`controllerAddr` must be set in the base fixture'); + } + + const boundaryApi = new BoundaryApi(controllerAddr); + + // what is passed to `use` is what is provided by the fixture in the test + await use(boundaryApi); + // anything after awaiting `use` is ran after the test is ran + + const { clients } = boundaryApi; + + // These delete methods have to be keyed of the pluralized resource type because + // that is how the resources are stored in `createdResources` and how the type is + // extracted from the url + const cleanUpMethods = { + accounts: clients.Account.accountServiceDeleteAccount.bind( + clients.Account, + ), + aliases: clients.Alias.aliasServiceDeleteAlias.bind(clients.Alias), + ['auth-tokens']: clients.AuthToken.authTokenServiceDeleteAuthToken.bind( + clients.AuthToken, + ), + ['auth-methods']: + clients.AuthMethod.authMethodServiceDeleteAuthMethod.bind( + clients.AuthMethod, + ), + ['credential-libraries']: + clients.CredentialLibrary.credentialLibraryServiceDeleteCredentialLibrary.bind( + clients.CredentialLibrary, + ), + credentials: clients.Credential.credentialServiceDeleteCredential.bind( + clients.Credential, + ), + ['credential-stores']: + clients.CredentialStore.credentialStoreServiceDeleteCredentialStore.bind( + clients.CredentialStore, + ), + groups: clients.Group.groupServiceDeleteGroup.bind(clients.Group), + ['host-catalogs']: + clients.HostCatalog.hostCatalogServiceDeleteHostCatalog.bind( + clients.HostCatalog, + ), + ['host-sets']: clients.HostSet.hostSetServiceDeleteHostSet.bind( + clients.HostSet, + ), + ['managed-groups']: + clients.ManagedGroup.managedGroupServiceDeleteManagedGroup.bind( + clients.ManagedGroup, + ), + policies: clients.Policy.policyServiceDeletePolicy.bind(clients.Policy), + roles: clients.Role.roleServiceDeleteRole.bind(clients.Role), + scopes: clients.Scope.scopeServiceDeleteScope.bind(clients.Scope), + ['storage-buckets']: + clients.StorageBucket.storageBucketServiceDeleteStorageBucket.bind( + clients.StorageBucket, + ), + targets: clients.Target.targetServiceDeleteTarget.bind(clients.Target), + users: clients.User.userServiceDeleteUser.bind(clients.User), + workers: clients.Worker.workerServiceDeleteWorker.bind(clients.Worker), + }; + + // clean up resources in batches per type + for (const [pluralizedResourceType, resources] of Object.entries( + boundaryApi.createdResources, + )) { + const cleanUpMethod = cleanUpMethods[pluralizedResourceType]; + + if (!cleanUpMethod) { + throw new Error( + `No delete method found for resource type: ${pluralizedResourceType}`, + ); + } + + // passed to cleanupMethod add `BoundaryE2EResourceCleanupHeader` header on + // outgoing calls + const cleanUpInitOverride = ({ init }) => { + return { + ...init, + headers: { + ...init.headers, + [BoundaryE2EResourceCleanupHeader]: 'true', + }, + }; + }; + + // this will race deletions for all unskipped created resources for a specific resource type + await Promise.all( + resources + .filter((resource) => { + return !boundaryApi.skipCleanupResources.some( + (r) => r.id === resource.id, + ); + }) + .map((resource) => { + return cleanUpMethod( + { id: resource.id }, + cleanUpInitOverride, + ).catch(async (error) => { + // if the resource is not found it was likely already deleted and the error can be ignored + if (error.response?.status === BoundaryApiStatusCodes.notFound) { + return; + } + + let responseDetails; + if (error.response) { + const clonedResponse = error.response.clone(); + const { status, statusText, url } = clonedResponse; + responseDetails = { + status, + statusText, + url, + body: await clonedResponse.text(), + }; + } + + console.warn( + `Failed to clean up resource of type ${pluralizedResourceType} with id ${resource.id}:`, + ); + + if (responseDetails) { + console.warn(responseDetails); + } + }); + }), + ); + } + }, +}); diff --git a/e2e-tests/openapitools.json b/e2e-tests/openapitools.json new file mode 100644 index 000000000..151c200f7 --- /dev/null +++ b/e2e-tests/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.13.0" + } +} diff --git a/e2e-tests/package.json b/e2e-tests/package.json index 536ed20b8..daaf9160a 100644 --- a/e2e-tests/package.json +++ b/e2e-tests/package.json @@ -14,6 +14,8 @@ "lint:js:fix": "eslint . --fix", "format": "concurrently \"npm:format:*\" --names \"format:\"", "format:js": "prettier --write './**/*.{js,mjs}'", + "generate:api-client": "pnpm clean:api-client && openapi-generator-cli generate -g typescript-fetch -o api-client -i ${OPENAPI_SWAGGER_URL_OR_FILE-https://raw.githubusercontent.com/hashicorp/boundary/main/internal/gen/controller.swagger.json}", + "clean:api-client": "rm -rf api-client || true", "admin": "pnpm playwright test --config admin/playwright.config.js", "admin:ce:aws": "pnpm run admin --grep \"(?=.*@ce)(?=.*@aws)\"", "admin:ce:docker": "pnpm run admin --grep \"(?=.*@ce)(?=.*@docker)\"", @@ -28,6 +30,7 @@ "devDependencies": { "@babel/core": "^7.26.10", "@babel/eslint-parser": "^7.21.3", + "@openapitools/openapi-generator-cli": "^2.20.2", "@playwright/test": "^1.49.0", "concurrently": "^9.1.0", "dotenv": "^16.4.5", diff --git a/package.json b/package.json index fe9f6c6d1..fc7a50e4f 100755 --- a/package.json +++ b/package.json @@ -55,7 +55,9 @@ "ignoredBuiltDependencies": [ "@parcel/watcher", "core-js", - "tesseract.js" + "tesseract.js", + "@nestjs/core", + "@openapitools/openapi-generator-cli" ], "onlyBuiltDependencies": [] }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ba71c332..24daec657 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -700,6 +700,9 @@ importers: '@babel/eslint-parser': specifier: ^7.21.3 version: 7.27.1(@babel/core@7.27.1)(eslint@8.57.1) + '@openapitools/openapi-generator-cli': + specifier: ^2.20.2 + version: 2.20.2(encoding@0.1.13) '@playwright/test': specifier: ^1.49.0 version: 1.52.0 @@ -2387,6 +2390,10 @@ packages: resolution: {integrity: sha512-F5z53uvRIF4dYfFfJP3a2Cqg+4P1dgJchJsFnsZE0eZp0LK8X7g2J0CsJHRgns+skpXOlM7n5vFGwkWCWj8qJg==} engines: {node: 12.* || >= 14} + '@lukeed/csprng@1.1.0': + resolution: {integrity: sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==} + engines: {node: '>=8'} + '@malept/cross-spawn-promise@2.0.0': resolution: {integrity: sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==} engines: {node: '>= 12.13.0'} @@ -2397,6 +2404,44 @@ packages: '@miragejs/pretender-node-polyfill@0.1.2': resolution: {integrity: sha512-M/BexG/p05C5lFfMunxo/QcgIJnMT2vDVCd00wNqK2ImZONIlEETZwWJu1QtLxtmYlSHlCFl3JNzp0tLe7OJ5g==} + '@nestjs/axios@4.0.0': + resolution: {integrity: sha512-1cB+Jyltu/uUPNQrpUimRHEQHrnQrpLzVj6dU3dgn6iDDDdahr10TgHFGTmw5VuJ9GzKZsCLDL78VSwJAs/9JQ==} + peerDependencies: + '@nestjs/common': ^10.0.0 || ^11.0.0 + axios: ^1.3.1 + rxjs: ^7.0.0 + + '@nestjs/common@11.1.1': + resolution: {integrity: sha512-crzp+1qeZ5EGL0nFTPy9NrVMAaUWewV5AwtQyv6SQ9yQPXwRl9W9hm1pt0nAtUu5QbYMbSuo7lYcF81EjM+nCA==} + peerDependencies: + class-transformer: '>=0.4.1' + class-validator: '>=0.13.2' + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + class-transformer: + optional: true + class-validator: + optional: true + + '@nestjs/core@11.1.1': + resolution: {integrity: sha512-UFoUAgLKFT+RwHTANJdr0dF7p0qS9QjkaUPjg8aafnjM/qxxxrUVDB49nVvyMlk+Hr1+vvcNaOHbWWQBxoZcHA==} + engines: {node: '>= 20'} + peerDependencies: + '@nestjs/common': ^11.0.0 + '@nestjs/microservices': ^11.0.0 + '@nestjs/platform-express': ^11.0.0 + '@nestjs/websockets': ^11.0.0 + reflect-metadata: ^0.1.12 || ^0.2.0 + rxjs: ^7.1.0 + peerDependenciesMeta: + '@nestjs/microservices': + optional: true + '@nestjs/platform-express': + optional: true + '@nestjs/websockets': + optional: true + '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': resolution: {integrity: sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==} @@ -2424,6 +2469,21 @@ packages: '@nullvoxpopuli/ember-composable-helpers@5.2.10': resolution: {integrity: sha512-60lzfYZ3Gn5f5NX7KKh01vOUeMYCgNFMxVwRBtxcyotCmBob3eoW6JL1hO3zStv79k/n/vijdr1o/G1N3+l8Fg==} + '@nuxt/opencollective@0.4.1': + resolution: {integrity: sha512-GXD3wy50qYbxCJ652bDrDzgMr3NFEkIS374+IgFQKkCvk9yiYcLvX2XDYr7UyQxf4wK0e+yqDYRubZ0DtOxnmQ==} + engines: {node: ^14.18.0 || >=16.10.0, npm: '>=5.10.0'} + hasBin: true + + '@nuxtjs/opencollective@0.3.2': + resolution: {integrity: sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==} + engines: {node: '>=8.0.0', npm: '>=5.0.0'} + hasBin: true + + '@openapitools/openapi-generator-cli@2.20.2': + resolution: {integrity: sha512-dNFwQcQu6+rmEWSJj4KUx468+p6Co7nfpVgi5QEfVhzKj7wBytz9GEhCN2qmVgtg3ZX8H6nxbXI8cjh7hAxAqg==} + engines: {node: '>=16'} + hasBin: true + '@parcel/watcher-android-arm64@2.5.1': resolution: {integrity: sha512-KF8+j9nNbUN8vzOFDpRMsaKBHZ/mcjEjMToVMJOhTozkDonQFFrRcfdLWn6yWKCmJKmdVxSgHiYvTCef4/qcBA==} engines: {node: '>= 10.0.0'} @@ -2586,10 +2646,20 @@ packages: '@textlint/markdown-to-ast@12.2.1': resolution: {integrity: sha512-p+LlVcrgHnSNEWWflYU412uu+v4Cejs6hmI4SgZCheNg4u7Ik78aKgpe4jT5BhjLSBZ/KP6IrJxtCUOoJIUWmQ==} + '@tokenizer/inflate@0.2.7': + resolution: {integrity: sha512-MADQgmZT1eKjp06jpI2yozxaU9uVs4GzzgSL+uEq7bVcJ9V1ZXQkeGNql1fsSI0gMy1vhvNTNbUqrx+pZfJVmg==} + engines: {node: '>=18'} + + '@tokenizer/token@0.3.0': + resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + '@tootallnate/once@2.0.0': resolution: {integrity: sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==} engines: {node: '>= 10'} + '@tootallnate/quickjs-emscripten@0.23.0': + resolution: {integrity: sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==} + '@types/body-parser@1.19.5': resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} @@ -2853,6 +2923,10 @@ packages: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} + agent-base@7.1.3: + resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + engines: {node: '>= 14'} + agentkeepalive@4.6.0: resolution: {integrity: sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==} engines: {node: '>= 8.0.0'} @@ -3025,6 +3099,10 @@ packages: resolution: {integrity: sha512-XTZ7xGML849LkQP86sWdQzfhwbt3YwIO6MqbX9mUNYY98VKaaVZP7YNNm70IpwecbkkxmfC5IYAzOQ/2p29zRA==} engines: {node: '>=4'} + ast-types@0.13.4: + resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==} + engines: {node: '>=4'} + astral-regex@2.0.0: resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} engines: {node: '>=8'} @@ -3049,6 +3127,9 @@ packages: async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + at-least-node@1.0.0: resolution: {integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==} engines: {node: '>= 4.0.0'} @@ -3065,6 +3146,9 @@ packages: resolution: {integrity: sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==} engines: {node: '>=4'} + axios@1.9.0: + resolution: {integrity: sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==} + babel-import-util@0.2.0: resolution: {integrity: sha512-CtWYYHU/MgK88rxMrLfkD356dApswtR/kWZ/c6JifG1m10e7tBBrs/366dFzWMAoqYmG5/JSh+94tUSpIwh+ag==} engines: {node: '>= 12.*'} @@ -3171,6 +3255,10 @@ packages: resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} engines: {node: '>= 0.8'} + basic-ftp@5.0.5: + resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} + engines: {node: '>=10.0.0'} + better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -3587,6 +3675,9 @@ packages: clipboard@2.0.11: resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==} + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -3647,6 +3738,10 @@ packages: resolution: {integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==} engines: {node: '>=0.1.90'} + combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + commander@12.1.0: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} @@ -3688,6 +3783,9 @@ packages: resolution: {integrity: sha512-pJDh5/4wrEnXX/VWRZvruAGHkzKdr46z11OlTPN+VrATlWWhSKewNCJ1futCO5C7eJB3nPMFZA1LeYtcFboZ2A==} engines: {node: '>=0.10.0'} + compare-versions@4.1.4: + resolution: {integrity: sha512-FemMreK9xNyL8gQevsdRMrvO4lFCkQP7qbuktn1q8ndcNk1+0mz7lgE7b/sNvbhVgY4w6tMN1FDp6aADjqw2rw==} + compressible@2.0.18: resolution: {integrity: sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==} engines: {node: '>= 0.6'} @@ -3699,6 +3797,11 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + concurrently@6.5.1: + resolution: {integrity: sha512-FlSwNpGjWQfRwPLXvJ/OgysbBxPkWpiVjy1042b0U7on7S7qwwMIILRj7WTN1mTgqa582bG6NFuScOoh6Zgdag==} + engines: {node: '>=10.0.0'} + hasBin: true + concurrently@9.1.0: resolution: {integrity: sha512-VxkzwMAn4LP7WyMnJNbHN5mKV9L2IbyDjpzemKr99sXNR3GqRNMMHdm7prV1ws9wg7ETj6WUkNOigZVsptwbgg==} engines: {node: '>=18'} @@ -3715,6 +3818,13 @@ packages: resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} engines: {node: '>= 0.10.0'} + consola@2.15.3: + resolution: {integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==} + + consola@3.4.2: + resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} + engines: {node: ^14.18.0 || >=16.10.0} + console-control-strings@1.1.0: resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} @@ -3722,6 +3832,10 @@ packages: resolution: {integrity: sha512-+5j3R4wZJcEYZeXk30whc4ZU/+fWW9JMTNntVuMYpjZJ9n26Cxr0tUBXco1NRjVZRpRVvZ4DDKKKIHNYeUG9Dw==} engines: {node: 6.* || 8.* || >= 10.*} + console.table@0.10.0: + resolution: {integrity: sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==} + engines: {node: '> 0.10'} + consolidate@0.16.0: resolution: {integrity: sha512-Nhl1wzCslqXYTJVDyJCu3ODohy9OfBMB5uD2BiBTzd7w+QY0lBzafkR8y8755yMYHAaMD4NuzbAw03/xzfw+eQ==} engines: {node: '>= 0.10.0'} @@ -4023,6 +4137,10 @@ packages: dag-map@2.0.2: resolution: {integrity: sha512-xnsprIzYuDeiyu5zSKwilV/ajRHxnoMlAhEREfyfTgTSViMVY2fGP1ZcHJbtwup26oCkofySU/m6oKJ3HrkW7w==} + data-uri-to-buffer@6.0.2: + resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} + engines: {node: '>= 14'} + data-view-buffer@1.0.2: resolution: {integrity: sha512-EmKO5V3OLXh1rtK2wgXRansaK1/mtVdTUEiEI0W8RkvgT05kfxaH29PliLnpLP73yYO6142Q72QNa8Wx/A5CqQ==} engines: {node: '>= 0.4'} @@ -4035,6 +4153,10 @@ packages: resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==} engines: {node: '>= 0.4'} + date-fns@2.30.0: + resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==} + engines: {node: '>=0.11'} + date-fns@3.6.0: resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} @@ -4132,6 +4254,14 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + degenerator@5.0.1: + resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} + engines: {node: '>= 14'} + + delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + delegate@3.2.0: resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==} @@ -4247,6 +4377,9 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + easy-table@1.1.0: + resolution: {integrity: sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==} + editions@1.3.4: resolution: {integrity: sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==} engines: {node: '>=0.8'} @@ -4878,6 +5011,11 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} + escodegen@2.1.0: + resolution: {integrity: sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==} + engines: {node: '>=6.0'} + hasBin: true + eslint-compat-utils@0.5.1: resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} engines: {node: '>=12'} @@ -5084,6 +5222,9 @@ packages: fast-ordered-set@1.0.3: resolution: {integrity: sha512-MxBW4URybFszOx1YlACEoK52P6lE3xiFcPaGCUZ7QQOZ6uJXKo++Se8wa31SjcZ+NC/fdAWX7UtKEfaGgHS2Vg==} + fast-safe-stringify@2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + fast-sourcemap-concat@2.1.1: resolution: {integrity: sha512-7h9/x25c6AQwdU3mA8MZDUMR3UCy50f237egBrBkuwjnUZSmfu4ptCf91PZSKzON2Uh5VvIHozYKWcPPgcjxIw==} engines: {node: 10.* || >= 12.*} @@ -5111,6 +5252,9 @@ packages: fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + fflate@0.8.2: + resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + figures@2.0.0: resolution: {integrity: sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==} engines: {node: '>=4'} @@ -5127,6 +5271,10 @@ packages: resolution: {integrity: sha512-TfW7/1iI4Cy7Y8L6iqNdZQVvdXn0f8B4QcIXmkIbtTIe/Okm/nSlHb4IwGzRVOd3WfSieCgvf5cMzEfySAIl0g==} engines: {node: '>=12.0.0'} + file-type@20.5.0: + resolution: {integrity: sha512-BfHZtG/l9iMm4Ecianu7P8HRD2tBHLtjXinm4X62XBOYzi7CYA7jyqfJzOvXHqzVrVPYqBo2/GvbARMaaJkKVg==} + engines: {node: '>=18'} + filename-reserved-regex@2.0.0: resolution: {integrity: sha512-lc1bnsSr4L4Bdif8Xb/qrtokGbq5zlsms/CYH8PP+WtCkGNF65DPiQY8vG3SakEdRn8Dlnm+gW/qWKKjS5sZzQ==} engines: {node: '>=4'} @@ -5240,6 +5388,10 @@ packages: foreach@2.0.6: resolution: {integrity: sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==} + form-data@4.0.3: + resolution: {integrity: sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==} + engines: {node: '>= 6'} + format@0.2.2: resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} engines: {node: '>=0.4.x'} @@ -5388,6 +5540,10 @@ packages: get-tsconfig@4.10.0: resolution: {integrity: sha512-kGzZ3LWWQcGIAmg6iWvXn0ei6WDtV26wzHRMwDSzmAbcXrTEXxHy6IehI6/4eT6VRKyMP1eF1VqwrVUmE/LR7A==} + get-uri@6.0.4: + resolution: {integrity: sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==} + engines: {node: '>= 14'} + git-cz@4.9.0: resolution: {integrity: sha512-cSRL8IIOXU7UFLdbziCYqg8f8InwLwqHezkiRHNSph7oZqGv0togId1kMTfKil6gzK0VaSXeVBb4oDl0fQCHiw==} hasBin: true @@ -5620,6 +5776,10 @@ packages: resolution: {integrity: sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==} engines: {node: '>= 6'} + http-proxy-agent@7.0.2: + resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} + engines: {node: '>= 14'} + http-proxy@1.18.1: resolution: {integrity: sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==} engines: {node: '>=8.0.0'} @@ -5632,6 +5792,10 @@ packages: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} + engines: {node: '>= 14'} + https@1.0.0: resolution: {integrity: sha512-4EC57ddXrkaF0x83Oj8sM6SLQHAWXw90Skqu2M4AEWENZ3F02dFJE/GARA8igO79tcgYqGrD7ae4f5L3um2lgg==} @@ -5748,6 +5912,10 @@ packages: resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} engines: {node: '>=8.0.0'} + inquirer@8.2.6: + resolution: {integrity: sha512-M1WuAmb7pn9zdFRtQYk26ZBoY043Sse0wVDdk4Bppr+JOXyQYybdtvK+l9wUibhtjdjvtoiNy8tk+EgsYIUqKg==} + engines: {node: '>=12.0.0'} + inquirer@9.3.7: resolution: {integrity: sha512-LJKFHCSeIRq9hanN14IlOtPSTe3lNES7TYDTE2xxdAy1LS5rYphajK1qtwvj3YmQXvvk0U2Vbmcni8P9EIQW9w==} engines: {node: '>=18'} @@ -6041,6 +6209,10 @@ packages: resolution: {integrity: sha512-+XRlFseT8B3L9KyjxxLjfXSLMuErKDsd8DBNrsaxoViABMEZlOSCstwmw0qpoFX3+U6yWU1yhLudAe6/lETGGA==} engines: {node: '>=0.12'} + iterare@1.2.1: + resolution: {integrity: sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==} + engines: {node: '>=6'} + jest-worker@27.5.1: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} @@ -6205,6 +6377,10 @@ packages: livereload-js@3.4.1: resolution: {integrity: sha512-5MP0uUeVCec89ZbNOT/i97Mc+q3SxXmiUGhRFOTmhrGPn//uWVQdCvcLJDy64MSBR5MidFdOR7B9viumoavy6g==} + load-esm@1.0.2: + resolution: {integrity: sha512-nVAvWk/jeyrWyXEAs84mpQCYccxRqgKY4OznLuJhJCa0XsPSfdOIr2zvBZEj3IHEHbX97jjscKRRV539bW0Gpw==} + engines: {node: '>=13.2.0'} + load-json-file@2.0.0: resolution: {integrity: sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==} engines: {node: '>=4'} @@ -6710,6 +6886,10 @@ packages: neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + netmask@2.0.2: + resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} + engines: {node: '>= 0.4.0'} + nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} @@ -6981,6 +7161,14 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + pac-proxy-agent@7.2.0: + resolution: {integrity: sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==} + engines: {node: '>= 14'} + + pac-resolver@7.0.1: + resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} + engines: {node: '>= 14'} + package-json@10.0.1: resolution: {integrity: sha512-ua1L4OgXSBdsu1FPb7F3tYH0F48a6kxvod4pLUlGY9COeJAJQNX/sNH2IiEmsxw7lqYiAwrdHMjz1FctOsyDQg==} engines: {node: '>=18'} @@ -7286,6 +7474,13 @@ packages: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} + proxy-agent@6.5.0: + resolution: {integrity: sha512-TmatMXdr2KlRiA2CyDu8GqR8EjahTG3aY3nXjdzFyoZbmB8hrBsTyMezhULIXKnC0jpfjlmiZ3+EaCzoInSu/A==} + engines: {node: '>= 14'} + + proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + pump@3.0.2: resolution: {integrity: sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==} @@ -7413,6 +7608,9 @@ packages: redeyed@1.0.1: resolution: {integrity: sha512-8eEWsNCkV2rvwKLS1Cvp5agNjMhwRe2um+y32B2+3LqOzg4C9BBPs6vzAfV16Ivb8B9HPNKIqd8OrdBws8kNlQ==} + reflect-metadata@0.2.2: + resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} + reflect.getprototypeof@1.0.10: resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} @@ -7635,6 +7833,9 @@ packages: rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} + rxjs@7.8.2: + resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} + safe-array-concat@1.1.3: resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==} engines: {node: '>=0.4'} @@ -7868,6 +8069,14 @@ packages: resolution: {integrity: sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==} engines: {node: '>= 10'} + socks-proxy-agent@8.0.5: + resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==} + engines: {node: '>= 14'} + + socks@2.8.4: + resolution: {integrity: sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==} + engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} + socks@2.8.6: resolution: {integrity: sha512-pe4Y2yzru68lXCb38aAqRf5gvN8YdjP1lok5o0J7BOHljkyCGKVz7H3vpVIXKD27rj2giOJ7DwVyk/GWrPHDWA==} engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} @@ -7912,6 +8121,9 @@ packages: spawn-args@0.2.0: resolution: {integrity: sha512-73BoniQDcRWgnLAf/suKH6V5H54gd1KLzwYN9FB6J/evqTV33htH9xwV/4BHek+++jzxpVlZQKKZkqstPQPmQg==} + spawn-command@0.0.2: + resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} + spdx-compare@1.0.0: resolution: {integrity: sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==} @@ -8065,6 +8277,10 @@ packages: resolution: {integrity: sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==} engines: {node: '>=0.10.0'} + strtok3@10.3.1: + resolution: {integrity: sha512-3JWEZM6mfix/GCJBBUrkA8p2Id2pBkyTkVCJKto55w080QBKZ+8R171fGrbiSp+yMO/u6F8/yUh7K4V9K+YCnw==} + engines: {node: '>=18'} + style-loader@2.0.0: resolution: {integrity: sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ==} engines: {node: '>= 10.13.0'} @@ -8302,6 +8518,10 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + token-types@6.0.0: + resolution: {integrity: sha512-lbDrTLVsHhOMljPscd0yitpozq7Ga2M5Cvez5AjGg8GASBjtt6iERCAJ93yommPmz62fb45oFIXHEZ3u9bfJEA==} + engines: {node: '>=14.16'} + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} @@ -8428,6 +8648,14 @@ packages: engines: {node: '>=0.8.0'} hasBin: true + uid@2.0.2: + resolution: {integrity: sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==} + engines: {node: '>=8'} + + uint8array-extras@1.4.0: + resolution: {integrity: sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ==} + engines: {node: '>=18'} + unbox-primitive@1.1.0: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} @@ -8758,6 +8986,10 @@ packages: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} + yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} @@ -10723,6 +10955,8 @@ snapshots: tslib: 2.8.1 upath: 2.0.1 + '@lukeed/csprng@1.1.0': {} + '@malept/cross-spawn-promise@2.0.0': dependencies: cross-spawn: 7.0.6 @@ -10731,6 +10965,36 @@ snapshots: '@miragejs/pretender-node-polyfill@0.1.2': {} + '@nestjs/axios@4.0.0(@nestjs/common@11.1.1(reflect-metadata@0.2.2)(rxjs@7.8.2))(axios@1.9.0)(rxjs@7.8.2)': + dependencies: + '@nestjs/common': 11.1.1(reflect-metadata@0.2.2)(rxjs@7.8.2) + axios: 1.9.0 + rxjs: 7.8.2 + + '@nestjs/common@11.1.1(reflect-metadata@0.2.2)(rxjs@7.8.2)': + dependencies: + file-type: 20.5.0 + iterare: 1.2.1 + load-esm: 1.0.2 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + tslib: 2.8.1 + uid: 2.0.2 + transitivePeerDependencies: + - supports-color + + '@nestjs/core@11.1.1(@nestjs/common@11.1.1(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2)(rxjs@7.8.2)': + dependencies: + '@nestjs/common': 11.1.1(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nuxt/opencollective': 0.4.1 + fast-safe-stringify: 2.1.1 + iterare: 1.2.1 + path-to-regexp: 8.2.0 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + tslib: 2.8.1 + uid: 2.0.2 + '@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1': dependencies: eslint-scope: 5.1.1 @@ -10767,6 +11031,48 @@ snapshots: - ember-source - supports-color + '@nuxt/opencollective@0.4.1': + dependencies: + consola: 3.4.2 + + '@nuxtjs/opencollective@0.3.2(encoding@0.1.13)': + dependencies: + chalk: 4.1.2 + consola: 2.15.3 + node-fetch: 2.7.0(encoding@0.1.13) + transitivePeerDependencies: + - encoding + + '@openapitools/openapi-generator-cli@2.20.2(encoding@0.1.13)': + dependencies: + '@nestjs/axios': 4.0.0(@nestjs/common@11.1.1(reflect-metadata@0.2.2)(rxjs@7.8.2))(axios@1.9.0)(rxjs@7.8.2) + '@nestjs/common': 11.1.1(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nestjs/core': 11.1.1(@nestjs/common@11.1.1(reflect-metadata@0.2.2)(rxjs@7.8.2))(reflect-metadata@0.2.2)(rxjs@7.8.2) + '@nuxtjs/opencollective': 0.3.2(encoding@0.1.13) + axios: 1.9.0 + chalk: 4.1.2 + commander: 8.3.0 + compare-versions: 4.1.4 + concurrently: 6.5.1 + console.table: 0.10.0 + fs-extra: 11.3.0 + glob: 9.3.5 + inquirer: 8.2.6 + lodash: 4.17.21 + proxy-agent: 6.5.0 + reflect-metadata: 0.2.2 + rxjs: 7.8.2 + tslib: 2.8.1 + transitivePeerDependencies: + - '@nestjs/microservices' + - '@nestjs/platform-express' + - '@nestjs/websockets' + - class-transformer + - class-validator + - debug + - encoding + - supports-color + '@parcel/watcher-android-arm64@2.5.1': optional: true @@ -10917,8 +11223,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@tokenizer/inflate@0.2.7': + dependencies: + debug: 4.4.0 + fflate: 0.8.2 + token-types: 6.0.0 + transitivePeerDependencies: + - supports-color + + '@tokenizer/token@0.3.0': {} + '@tootallnate/once@2.0.0': {} + '@tootallnate/quickjs-emscripten@0.23.0': {} + '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 @@ -11267,6 +11585,8 @@ snapshots: transitivePeerDependencies: - supports-color + agent-base@7.1.3: {} + agentkeepalive@4.6.0: dependencies: humanize-ms: 1.2.1 @@ -11428,6 +11748,10 @@ snapshots: ast-types@0.13.3: {} + ast-types@0.13.4: + dependencies: + tslib: 2.8.1 + astral-regex@2.0.0: {} async-disk-cache@1.3.5: @@ -11469,6 +11793,8 @@ snapshots: async@3.2.6: {} + asynckit@0.4.0: {} + at-least-node@1.0.0: {} author-regex@1.0.0: {} @@ -11479,6 +11805,14 @@ snapshots: axe-core@4.10.3: {} + axios@1.9.0: + dependencies: + follow-redirects: 1.15.9 + form-data: 4.0.3 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + babel-import-util@0.2.0: {} babel-import-util@2.1.1: {} @@ -11599,6 +11933,8 @@ snapshots: dependencies: safe-buffer: 5.1.2 + basic-ftp@5.0.5: {} + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -12304,6 +12640,12 @@ snapshots: select: 1.1.2 tiny-emitter: 2.1.0 + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -12356,6 +12698,10 @@ snapshots: colors@1.4.0: {} + combined-stream@1.0.8: + dependencies: + delayed-stream: 1.0.0 + commander@12.1.0: {} commander@2.20.3: {} @@ -12378,6 +12724,8 @@ snapshots: compare-version@0.1.2: {} + compare-versions@4.1.4: {} + compressible@2.0.18: dependencies: mime-db: 1.54.0 @@ -12396,6 +12744,17 @@ snapshots: concat-map@0.0.1: {} + concurrently@6.5.1: + dependencies: + chalk: 4.1.2 + date-fns: 2.30.0 + lodash: 4.17.21 + rxjs: 6.6.7 + spawn-command: 0.0.2 + supports-color: 8.1.1 + tree-kill: 1.2.2 + yargs: 16.2.0 + concurrently@9.1.0: dependencies: chalk: 4.1.2 @@ -12429,6 +12788,10 @@ snapshots: transitivePeerDependencies: - supports-color + consola@2.15.3: {} + + consola@3.4.2: {} + console-control-strings@1.1.0: {} console-ui@3.1.2: @@ -12439,6 +12802,10 @@ snapshots: ora: 3.4.0 through2: 3.0.2 + console.table@0.10.0: + dependencies: + easy-table: 1.1.0 + consolidate@0.16.0(handlebars@4.7.8)(lodash@4.17.21)(mustache@4.2.0)(underscore@1.13.7): dependencies: bluebird: 3.7.2 @@ -12577,6 +12944,8 @@ snapshots: dag-map@2.0.2: {} + data-uri-to-buffer@6.0.2: {} + data-view-buffer@1.0.2: dependencies: call-bound: 1.0.4 @@ -12595,6 +12964,10 @@ snapshots: es-errors: 1.3.0 is-data-view: 1.0.2 + date-fns@2.30.0: + dependencies: + '@babel/runtime': 7.27.6 + date-fns@3.6.0: {} debug@2.6.9: @@ -12670,6 +13043,14 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + degenerator@5.0.1: + dependencies: + ast-types: 0.13.4 + escodegen: 2.1.0 + esprima: 4.0.1 + + delayed-stream@1.0.0: {} + delegate@3.2.0: {} delegates@1.0.0: {} @@ -12780,6 +13161,10 @@ snapshots: eastasianwidth@0.2.0: {} + easy-table@1.1.0: + optionalDependencies: + wcwidth: 1.0.1 + editions@1.3.4: {} editions@2.3.1: @@ -14201,6 +14586,14 @@ snapshots: escape-string-regexp@4.0.0: {} + escodegen@2.1.0: + dependencies: + esprima: 4.0.1 + estraverse: 5.3.0 + esutils: 2.0.3 + optionalDependencies: + source-map: 0.6.1 + eslint-compat-utils@0.5.1(eslint@8.57.1): dependencies: eslint: 8.57.1 @@ -14499,6 +14892,8 @@ snapshots: dependencies: blank-object: 1.0.2 + fast-safe-stringify@2.1.1: {} + fast-sourcemap-concat@2.1.1: dependencies: chalk: 2.4.2 @@ -14535,6 +14930,8 @@ snapshots: dependencies: pend: 1.2.0 + fflate@0.8.2: {} + figures@2.0.0: dependencies: escape-string-regexp: 1.0.5 @@ -14551,6 +14948,15 @@ snapshots: dependencies: flat-cache: 3.2.0 + file-type@20.5.0: + dependencies: + '@tokenizer/inflate': 0.2.7 + strtok3: 10.3.1 + token-types: 6.0.0 + uint8array-extras: 1.4.0 + transitivePeerDependencies: + - supports-color + filename-reserved-regex@2.0.0: {} filenamify@4.3.0: @@ -14704,6 +15110,14 @@ snapshots: foreach@2.0.6: {} + form-data@4.0.3: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + hasown: 2.0.2 + mime-types: 2.1.35 + format@0.2.2: {} forwarded@0.2.0: {} @@ -14907,6 +15321,14 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 + get-uri@6.0.4: + dependencies: + basic-ftp: 5.0.5 + data-uri-to-buffer: 6.0.2 + debug: 4.4.0 + transitivePeerDependencies: + - supports-color + git-cz@4.9.0: {} git-hooks-list@1.0.3: {} @@ -15198,6 +15620,13 @@ snapshots: transitivePeerDependencies: - supports-color + http-proxy-agent@7.0.2: + dependencies: + agent-base: 7.1.3 + debug: 4.4.0 + transitivePeerDependencies: + - supports-color + http-proxy@1.18.1: dependencies: eventemitter3: 4.0.7 @@ -15218,6 +15647,13 @@ snapshots: transitivePeerDependencies: - supports-color + https-proxy-agent@7.0.6: + dependencies: + agent-base: 7.1.3 + debug: 4.4.0 + transitivePeerDependencies: + - supports-color + https@1.0.0: {} human-signals@1.1.1: {} @@ -15323,6 +15759,24 @@ snapshots: strip-ansi: 6.0.1 through: 2.3.8 + inquirer@8.2.6: + dependencies: + ansi-escapes: 4.3.2 + chalk: 4.1.2 + cli-cursor: 3.1.0 + cli-width: 3.0.0 + external-editor: 3.1.0 + figures: 3.2.0 + lodash: 4.17.21 + mute-stream: 0.0.8 + ora: 5.4.1 + run-async: 2.4.1 + rxjs: 7.8.2 + string-width: 4.2.3 + strip-ansi: 6.0.1 + through: 2.3.8 + wrap-ansi: 6.2.0 + inquirer@9.3.7: dependencies: '@inquirer/figures': 1.0.11 @@ -15599,6 +16053,8 @@ snapshots: editions: 2.3.1 textextensions: 2.6.0 + iterare@1.2.1: {} + jest-worker@27.5.1: dependencies: '@types/node': 22.15.17 @@ -15779,6 +16235,8 @@ snapshots: livereload-js@3.4.1: {} + load-esm@1.0.2: {} + load-json-file@2.0.0: dependencies: graceful-fs: 4.2.11 @@ -16336,6 +16794,8 @@ snapshots: neo-async@2.6.2: {} + netmask@2.0.2: {} + nice-try@1.0.5: {} nise@6.1.1: @@ -16630,6 +17090,24 @@ snapshots: p-try@2.2.0: {} + pac-proxy-agent@7.2.0: + dependencies: + '@tootallnate/quickjs-emscripten': 0.23.0 + agent-base: 7.1.3 + debug: 4.4.0 + get-uri: 6.0.4 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + pac-resolver: 7.0.1 + socks-proxy-agent: 8.0.5 + transitivePeerDependencies: + - supports-color + + pac-resolver@7.0.1: + dependencies: + degenerator: 5.0.1 + netmask: 2.0.2 + package-json@10.0.1: dependencies: ky: 1.8.1 @@ -16879,6 +17357,21 @@ snapshots: forwarded: 0.2.0 ipaddr.js: 1.9.1 + proxy-agent@6.5.0: + dependencies: + agent-base: 7.1.3 + debug: 4.4.0 + http-proxy-agent: 7.0.2 + https-proxy-agent: 7.0.6 + lru-cache: 7.18.3 + pac-proxy-agent: 7.2.0 + proxy-from-env: 1.1.0 + socks-proxy-agent: 8.0.5 + transitivePeerDependencies: + - supports-color + + proxy-from-env@1.1.0: {} + pump@3.0.2: dependencies: end-of-stream: 1.4.4 @@ -17039,6 +17532,8 @@ snapshots: dependencies: esprima: 3.0.0 + reflect-metadata@0.2.2: {} + reflect.getprototypeof@1.0.10: dependencies: call-bind: 1.0.8 @@ -17273,6 +17768,10 @@ snapshots: dependencies: tslib: 2.8.1 + rxjs@7.8.2: + dependencies: + tslib: 2.8.1 + safe-array-concat@1.1.3: dependencies: call-bind: 1.0.8 @@ -17579,6 +18078,19 @@ snapshots: transitivePeerDependencies: - supports-color + socks-proxy-agent@8.0.5: + dependencies: + agent-base: 7.1.3 + debug: 4.4.0 + socks: 2.8.4 + transitivePeerDependencies: + - supports-color + + socks@2.8.4: + dependencies: + ip-address: 9.0.5 + smart-buffer: 4.2.0 + socks@2.8.6: dependencies: ip-address: 9.0.5 @@ -17622,6 +18134,8 @@ snapshots: spawn-args@0.2.0: {} + spawn-command@0.0.2: {} + spdx-compare@1.0.0: dependencies: array-find-index: 1.0.2 @@ -17784,6 +18298,10 @@ snapshots: dependencies: escape-string-regexp: 1.0.5 + strtok3@10.3.1: + dependencies: + '@tokenizer/token': 0.3.0 + style-loader@2.0.0(webpack@5.99.8): dependencies: loader-utils: 2.0.4 @@ -18172,6 +18690,11 @@ snapshots: toidentifier@1.0.1: {} + token-types@6.0.0: + dependencies: + '@tokenizer/token': 0.3.0 + ieee754: 1.2.1 + tr46@0.0.3: {} tracked-built-ins@3.4.0(@babel/core@7.27.1): @@ -18308,6 +18831,12 @@ snapshots: uglify-js@3.19.3: optional: true + uid@2.0.2: + dependencies: + '@lukeed/csprng': 1.1.0 + + uint8array-extras@1.4.0: {} + unbox-primitive@1.1.0: dependencies: call-bound: 1.0.4 @@ -18688,6 +19217,16 @@ snapshots: yargs-parser@21.1.1: {} + yargs@16.2.0: + dependencies: + cliui: 7.0.4 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + yargs@17.7.2: dependencies: cliui: 8.0.1