From 92d1a1af1567786e72e60c775c54a85bf7d153a9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 28 Jan 2026 08:01:08 +0000 Subject: [PATCH] Update api clients --- C#/README.md | 27 +- C#/dagshub_api.sln | 10 +- C#/docs/AnnotationsApi.md | 599 +++++ C#/docs/CreateAnnotatorTeam.md | 12 + C#/docs/Files1.md | 3 +- C#/docs/GrantLabelStudioAccess.md | 10 + C#/docs/InlineResponse200.md | 11 + C#/docs/LabelStudioProjectAccess.md | 16 + C#/docs/OrganizationsApi.md | 77 + C#/docs/StorageIntegrationsApi.md | 10 +- .../Api/AnnotationsApiTests.cs | 177 ++ .../dagshub_api.Test/Api/BranchesApiTests.cs | 2 +- .../Api/CollaboratorsApiTests.cs | 2 +- .../dagshub_api.Test/Api/CommitsApiTests.cs | 2 +- .../dagshub_api.Test/Api/ContentApiTests.cs | 2 +- .../Api/ExperimentsApiTests.cs | 2 +- C#/src/dagshub_api.Test/Api/IssuesApiTests.cs | 2 +- .../Api/OrganizationsApiTests.cs | 79 + .../dagshub_api.Test/Api/ReleasesApiTests.cs | 2 +- .../Api/RepositoryApiTests.cs | 2 +- .../Api/StorageIntegrationsApiTests.cs | 5 +- C#/src/dagshub_api.Test/Api/UserApiTests.cs | 2 +- .../dagshub_api.Test/Api/WebhooksApiTests.cs | 2 +- .../CollaboratorsCollaboratorBodyTests.cs | 2 +- .../Model/CreateAnnotatorTeamTests.cs | 103 + .../dagshub_api.Test/Model/CreateRepoTests.cs | 2 +- .../Model/EditExperimentPostTests.cs | 2 +- .../Model/ExperimentKeysTests.cs | 2 +- C#/src/dagshub_api.Test/Model/FileTests.cs | 2 +- C#/src/dagshub_api.Test/Model/Files1Tests.cs | 10 +- C#/src/dagshub_api.Test/Model/FilesTests.cs | 2 +- .../Model/GrantLabelStudioAccessTests.cs | 87 + .../Model/HooksIdBodyTests.cs | 2 +- .../Model/InlineResponse200Tests.cs | 95 + .../Model/IntegrationInnerTests.cs | 2 +- .../Model/IntegrationTests.cs | 2 +- .../Model/IssueAssigneeTests.cs | 2 +- .../Model/IssueLabelsTests.cs | 2 +- .../Model/IssueMilestoneTests.cs | 2 +- C#/src/dagshub_api.Test/Model/IssueTests.cs | 2 +- C#/src/dagshub_api.Test/Model/IssuesTests.cs | 2 +- .../Model/LabelStudioProjectAccessTests.cs | 135 ++ C#/src/dagshub_api.Test/Model/LabelsTests.cs | 2 +- .../Model/MigrateRepoTests.cs | 2 +- .../dagshub_api.Test/Model/PatchIssueTests.cs | 2 +- .../dagshub_api.Test/Model/PostIssueTests.cs | 2 +- C#/src/dagshub_api.Test/Model/PutFileTests.cs | 2 +- .../Model/RepoHooksBodyTests.cs | 2 +- C#/src/dagshub_api.Test/Model/StateTests.cs | 2 +- C#/src/dagshub_api.Test/Model/UserTests.cs | 2 +- .../Model/WebhookConfigTests.cs | 2 +- .../Model/WebhookEventsTests.cs | 2 +- .../dagshub_api.Test/dagshub_api.Test.csproj | 4 +- C#/src/dagshub_api/Api/AnnotationsApi.cs | 2032 +++++++++++++++++ C#/src/dagshub_api/Api/BranchesApi.cs | 2 +- C#/src/dagshub_api/Api/CollaboratorsApi.cs | 2 +- C#/src/dagshub_api/Api/CommitsApi.cs | 2 +- C#/src/dagshub_api/Api/ContentApi.cs | 2 +- C#/src/dagshub_api/Api/ExperimentsApi.cs | 2 +- C#/src/dagshub_api/Api/IssuesApi.cs | 2 +- C#/src/dagshub_api/Api/OrganizationsApi.cs | 363 +++ C#/src/dagshub_api/Api/ReleasesApi.cs | 2 +- C#/src/dagshub_api/Api/RepositoryApi.cs | 2 +- .../dagshub_api/Api/StorageIntegrationsApi.cs | 48 +- C#/src/dagshub_api/Api/UserApi.cs | 2 +- C#/src/dagshub_api/Api/WebhooksApi.cs | 2 +- C#/src/dagshub_api/Client/ApiClient.cs | 2 +- C#/src/dagshub_api/Client/ApiException.cs | 2 +- C#/src/dagshub_api/Client/ApiResponse.cs | 2 +- C#/src/dagshub_api/Client/Configuration.cs | 4 +- C#/src/dagshub_api/Client/ExceptionFactory.cs | 2 +- .../dagshub_api/Client/GlobalConfiguration.cs | 2 +- C#/src/dagshub_api/Client/IApiAccessor.cs | 2 +- .../Client/IReadableConfiguration.cs | 2 +- .../Client/SwaggerDateConverter.cs | 2 +- .../Model/CollaboratorsCollaboratorBody.cs | 2 +- .../dagshub_api/Model/CreateAnnotatorTeam.cs | 229 ++ C#/src/dagshub_api/Model/CreateRepo.cs | 2 +- .../dagshub_api/Model/EditExperimentPost.cs | 2 +- C#/src/dagshub_api/Model/ExperimentKeys.cs | 2 +- C#/src/dagshub_api/Model/File.cs | 2 +- C#/src/dagshub_api/Model/Files.cs | 2 +- C#/src/dagshub_api/Model/Files1.cs | 25 +- .../Model/GrantLabelStudioAccess.cs | 173 ++ C#/src/dagshub_api/Model/HooksIdBody.cs | 2 +- C#/src/dagshub_api/Model/InlineResponse200.cs | 170 ++ C#/src/dagshub_api/Model/Integration.cs | 2 +- C#/src/dagshub_api/Model/IntegrationInner.cs | 2 +- C#/src/dagshub_api/Model/Issue.cs | 2 +- C#/src/dagshub_api/Model/IssueAssignee.cs | 2 +- C#/src/dagshub_api/Model/IssueLabels.cs | 2 +- C#/src/dagshub_api/Model/IssueMilestone.cs | 2 +- C#/src/dagshub_api/Model/Issues.cs | 2 +- .../Model/LabelStudioProjectAccess.cs | 253 ++ C#/src/dagshub_api/Model/Labels.cs | 2 +- C#/src/dagshub_api/Model/MigrateRepo.cs | 2 +- C#/src/dagshub_api/Model/PatchIssue.cs | 2 +- C#/src/dagshub_api/Model/PostIssue.cs | 2 +- C#/src/dagshub_api/Model/PutFile.cs | 2 +- C#/src/dagshub_api/Model/RepoHooksBody.cs | 2 +- C#/src/dagshub_api/Model/State.cs | 2 +- C#/src/dagshub_api/Model/User.cs | 2 +- C#/src/dagshub_api/Model/WebhookConfig.cs | 2 +- C#/src/dagshub_api/Model/WebhookEvents.cs | 2 +- C#/src/dagshub_api/dagshub_api.csproj | 4 +- Go/README.md | 15 +- Go/api/swagger.yaml | 529 ++++- Go/api_annotations.go | 837 +++++++ Go/api_branches.go | 2 +- Go/api_collaborators.go | 2 +- Go/api_commits.go | 2 +- Go/api_content.go | 2 +- Go/api_experiments.go | 2 +- Go/api_issues.go | 2 +- Go/api_organizations.go | 110 + Go/api_releases.go | 2 +- Go/api_repository.go | 2 +- Go/api_storage_integrations.go | 9 +- Go/api_user.go | 2 +- Go/api_webhooks.go | 2 +- Go/client.go | 10 +- Go/configuration.go | 2 +- Go/docs/AnnotationsApi.md | 313 +++ Go/docs/CreateAnnotatorTeam.md | 12 + Go/docs/Files1.md | 3 +- Go/docs/GrantLabelStudioAccess.md | 10 + Go/docs/InlineResponse200.md | 11 + Go/docs/LabelStudioProjectAccess.md | 16 + Go/docs/OrganizationsApi.md | 37 + Go/docs/StorageIntegrationsApi.md | 3 +- Go/model_collaborators_collaborator_body.go | 2 +- Go/model_create_annotator_team.go | 20 + Go/model_create_repo.go | 2 +- Go/model_edit_experiment_post.go | 2 +- Go/model_experiment_keys.go | 2 +- Go/model_file.go | 2 +- Go/model_files_1.go | 4 +- Go/model_grant_label_studio_access.go | 16 + Go/model_hooks_id_body.go | 2 +- Go/model_inline_response_200.go | 15 + Go/model_integration_inner.go | 2 +- Go/model_issue.go | 2 +- Go/model_issue_assignee.go | 2 +- Go/model_issue_labels.go | 2 +- Go/model_issue_milestone.go | 2 +- Go/model_label_studio_project_access.go | 23 + Go/model_migrate_repo.go | 2 +- Go/model_patch_issue.go | 2 +- Go/model_post_issue.go | 2 +- Go/model_put_file.go | 2 +- Go/model_repo_hooks_body.go | 2 +- Go/model_state.go | 2 +- Go/model_user.go | 2 +- Go/model_webhook_config.go | 2 +- Go/response.go | 2 +- Java/README.md | 260 ++- Java/docs/AnnotationsApi.md | 527 +++++ Java/docs/CreateAnnotatorTeam.md | 24 + Java/docs/Files1.md | 3 +- Java/docs/GrantLabelStudioAccess.md | 14 + Java/docs/InlineResponse200.md | 15 + Java/docs/LabelStudioProjectAccess.md | 20 + Java/docs/OrganizationsApi.md | 68 + Java/docs/StorageIntegrationsApi.md | 10 +- .../java/io/swagger/client/ApiCallback.java | 2 +- .../java/io/swagger/client/ApiClient.java | 2 +- .../java/io/swagger/client/ApiException.java | 4 +- .../java/io/swagger/client/ApiResponse.java | 2 +- .../java/io/swagger/client/Configuration.java | 4 +- .../client/GzipRequestInterceptor.java | 2 +- .../src/main/java/io/swagger/client/JSON.java | 2 +- .../src/main/java/io/swagger/client/Pair.java | 4 +- .../swagger/client/ProgressRequestBody.java | 2 +- .../swagger/client/ProgressResponseBody.java | 2 +- .../java/io/swagger/client/StringUtil.java | 4 +- .../io/swagger/client/api/AnnotationsApi.java | 1220 ++++++++++ .../io/swagger/client/api/BranchesApi.java | 2 +- .../swagger/client/api/CollaboratorsApi.java | 2 +- .../io/swagger/client/api/CommitsApi.java | 2 +- .../io/swagger/client/api/ContentApi.java | 2 +- .../io/swagger/client/api/ExperimentsApi.java | 2 +- .../java/io/swagger/client/api/IssuesApi.java | 2 +- .../swagger/client/api/OrganizationsApi.java | 185 ++ .../io/swagger/client/api/ReleasesApi.java | 2 +- .../io/swagger/client/api/RepositoryApi.java | 2 +- .../client/api/StorageIntegrationsApi.java | 34 +- .../java/io/swagger/client/api/UserApi.java | 2 +- .../io/swagger/client/api/WebhooksApi.java | 2 +- .../io/swagger/client/auth/ApiKeyAuth.java | 4 +- .../swagger/client/auth/Authentication.java | 2 +- .../io/swagger/client/auth/HttpBasicAuth.java | 2 +- .../java/io/swagger/client/auth/OAuth.java | 4 +- .../io/swagger/client/auth/OAuthFlow.java | 2 +- .../model/CollaboratorsCollaboratorBody.java | 4 +- .../client/model/CreateAnnotatorTeam.java | 243 ++ .../io/swagger/client/model/CreateRepo.java | 4 +- .../client/model/EditExperimentPost.java | 4 +- .../swagger/client/model/ExperimentKeys.java | 4 +- .../java/io/swagger/client/model/File.java | 4 +- .../java/io/swagger/client/model/Files.java | 4 +- .../java/io/swagger/client/model/Files1.java | 33 +- .../client/model/GrantLabelStudioAccess.java | 155 ++ .../io/swagger/client/model/HooksIdBody.java | 4 +- .../client/model/InlineResponse200.java | 178 ++ .../io/swagger/client/model/Integration.java | 4 +- .../client/model/IntegrationInner.java | 4 +- .../java/io/swagger/client/model/Issue.java | 4 +- .../swagger/client/model/IssueAssignee.java | 4 +- .../io/swagger/client/model/IssueLabels.java | 4 +- .../swagger/client/model/IssueMilestone.java | 4 +- .../java/io/swagger/client/model/Issues.java | 4 +- .../model/LabelStudioProjectAccess.java | 294 +++ .../java/io/swagger/client/model/Labels.java | 4 +- .../io/swagger/client/model/MigrateRepo.java | 4 +- .../io/swagger/client/model/PatchIssue.java | 4 +- .../io/swagger/client/model/PostIssue.java | 4 +- .../java/io/swagger/client/model/PutFile.java | 4 +- .../swagger/client/model/RepoHooksBody.java | 4 +- .../java/io/swagger/client/model/State.java | 2 +- .../java/io/swagger/client/model/User.java | 4 +- .../swagger/client/model/WebhookConfig.java | 4 +- .../swagger/client/model/WebhookEvents.java | 4 +- .../client/api/AnnotationsApiTest.java | 178 ++ .../swagger/client/api/BranchesApiTest.java | 2 +- .../client/api/CollaboratorsApiTest.java | 2 +- .../io/swagger/client/api/CommitsApiTest.java | 2 +- .../io/swagger/client/api/ContentApiTest.java | 2 +- .../client/api/ExperimentsApiTest.java | 2 +- .../io/swagger/client/api/IssuesApiTest.java | 2 +- .../client/api/OrganizationsApiTest.java | 50 + .../swagger/client/api/ReleasesApiTest.java | 2 +- .../swagger/client/api/RepositoryApiTest.java | 2 +- .../api/StorageIntegrationsApiTest.java | 5 +- .../io/swagger/client/api/UserApiTest.java | 2 +- .../swagger/client/api/WebhooksApiTest.java | 2 +- JavaScript/README.md | 29 +- JavaScript/docs/AnnotationsApi.md | 497 ++++ JavaScript/docs/CreateAnnotatorTeam.md | 24 + JavaScript/docs/Files1.md | 3 +- JavaScript/docs/GrantLabelStudioAccess.md | 14 + JavaScript/docs/InlineResponse200.md | 15 + JavaScript/docs/LabelStudioProjectAccess.md | 20 + JavaScript/docs/OrganizationsApi.md | 64 + JavaScript/docs/StorageIntegrationsApi.md | 6 +- JavaScript/package.json | 2 +- JavaScript/src/ApiClient.js | 4 +- JavaScript/src/api/AnnotationsApi.js | 504 ++++ JavaScript/src/api/BranchesApi.js | 4 +- JavaScript/src/api/CollaboratorsApi.js | 4 +- JavaScript/src/api/CommitsApi.js | 4 +- JavaScript/src/api/ContentApi.js | 4 +- JavaScript/src/api/ExperimentsApi.js | 4 +- JavaScript/src/api/IssuesApi.js | 4 +- JavaScript/src/api/OrganizationsApi.js | 89 + JavaScript/src/api/ReleasesApi.js | 4 +- JavaScript/src/api/RepositoryApi.js | 4 +- JavaScript/src/api/StorageIntegrationsApi.js | 9 +- JavaScript/src/api/UserApi.js | 4 +- JavaScript/src/api/WebhooksApi.js | 4 +- JavaScript/src/index.js | 46 +- JavaScript/src/model/Assignee.js | 4 +- JavaScript/src/model/Body.js | 4 +- JavaScript/src/model/Closed.js | 4 +- .../model/CollaboratorsCollaboratorBody.js | 4 +- JavaScript/src/model/CreateAnnotatorTeam.js | 122 + JavaScript/src/model/CreateRepo.js | 4 +- JavaScript/src/model/EditExperimentPost.js | 4 +- JavaScript/src/model/ExperimentKeys.js | 4 +- JavaScript/src/model/File.js | 4 +- JavaScript/src/model/Files.js | 4 +- JavaScript/src/model/Files1.js | 12 +- .../src/model/GrantLabelStudioAccess.js | 82 + JavaScript/src/model/HooksIdBody.js | 4 +- JavaScript/src/model/InlineResponse200.js | 84 + JavaScript/src/model/Integration.js | 4 +- JavaScript/src/model/IntegrationInner.js | 4 +- JavaScript/src/model/Issue.js | 4 +- JavaScript/src/model/IssueAssignee.js | 4 +- JavaScript/src/model/IssueLabels.js | 4 +- JavaScript/src/model/IssueMilestone.js | 4 +- JavaScript/src/model/Issues.js | 4 +- .../src/model/LabelStudioProjectAccess.js | 123 + JavaScript/src/model/Labels.js | 4 +- JavaScript/src/model/MigrateRepo.js | 4 +- JavaScript/src/model/Milestone.js | 4 +- JavaScript/src/model/PatchIssue.js | 4 +- JavaScript/src/model/PostIssue.js | 4 +- JavaScript/src/model/PutFile.js | 4 +- JavaScript/src/model/RepoHooksBody.js | 4 +- JavaScript/src/model/State.js | 2 +- JavaScript/src/model/Title.js | 4 +- JavaScript/src/model/User.js | 4 +- JavaScript/src/model/WebhookConfig.js | 4 +- JavaScript/src/model/WebhookEvents.js | 4 +- JavaScript/test/api/AnnotationsApi.spec.js | 210 ++ JavaScript/test/api/BranchesApi.spec.js | 2 +- JavaScript/test/api/CollaboratorsApi.spec.js | 2 +- JavaScript/test/api/CommitsApi.spec.js | 2 +- JavaScript/test/api/ContentApi.spec.js | 2 +- JavaScript/test/api/ExperimentsApi.spec.js | 2 +- JavaScript/test/api/IssuesApi.spec.js | 2 +- JavaScript/test/api/OrganizationsApi.spec.js | 58 + JavaScript/test/api/ReleasesApi.spec.js | 2 +- JavaScript/test/api/RepositoryApi.spec.js | 2 +- .../test/api/StorageIntegrationsApi.spec.js | 2 +- JavaScript/test/api/UserApi.spec.js | 2 +- JavaScript/test/api/WebhooksApi.spec.js | 2 +- JavaScript/test/model/Assignee.spec.js | 2 +- JavaScript/test/model/Body.spec.js | 2 +- JavaScript/test/model/Closed.spec.js | 2 +- .../CollaboratorsCollaboratorBody.spec.js | 2 +- .../test/model/CreateAnnotatorTeam.spec.js | 69 + JavaScript/test/model/CreateRepo.spec.js | 2 +- .../test/model/EditExperimentPost.spec.js | 2 +- JavaScript/test/model/ExperimentKeys.spec.js | 2 +- JavaScript/test/model/File.spec.js | 2 +- JavaScript/test/model/Files.spec.js | 2 +- JavaScript/test/model/Files1.spec.js | 8 +- .../test/model/GrantLabelStudioAccess.spec.js | 57 + JavaScript/test/model/HooksIdBody.spec.js | 2 +- .../test/model/InlineResponse200.spec.js | 63 + JavaScript/test/model/Integration.spec.js | 2 +- .../test/model/IntegrationInner.spec.js | 2 +- JavaScript/test/model/Issue.spec.js | 2 +- JavaScript/test/model/IssueAssignee.spec.js | 2 +- JavaScript/test/model/IssueLabels.spec.js | 2 +- JavaScript/test/model/IssueMilestone.spec.js | 2 +- JavaScript/test/model/Issues.spec.js | 2 +- .../model/LabelStudioProjectAccess.spec.js | 93 + JavaScript/test/model/Labels.spec.js | 2 +- JavaScript/test/model/MigrateRepo.spec.js | 2 +- JavaScript/test/model/Milestone.spec.js | 2 +- JavaScript/test/model/PatchIssue.spec.js | 2 +- JavaScript/test/model/PostIssue.spec.js | 2 +- JavaScript/test/model/PutFile.spec.js | 2 +- JavaScript/test/model/RepoHooksBody.spec.js | 2 +- JavaScript/test/model/State.spec.js | 2 +- JavaScript/test/model/Title.spec.js | 2 +- JavaScript/test/model/User.spec.js | 2 +- JavaScript/test/model/WebhookConfig.spec.js | 2 +- JavaScript/test/model/WebhookEvents.spec.js | 2 +- Kotlin/README.md | 13 + Kotlin/docs/AnnotationsApi.md | 431 ++++ Kotlin/docs/CreateAnnotatorTeam.md | 21 + Kotlin/docs/Files_1.md | 3 +- Kotlin/docs/GrantLabelStudioAccess.md | 13 + Kotlin/docs/Inline_response_200.md | 14 + Kotlin/docs/LabelStudioProjectAccess.md | 19 + Kotlin/docs/OrganizationsApi.md | 56 + Kotlin/docs/StorageIntegrationsApi.md | 10 +- .../io/swagger/client/apis/AnnotationsApi.kt | 242 ++ .../io/swagger/client/apis/BranchesApi.kt | 2 +- .../swagger/client/apis/CollaboratorsApi.kt | 2 +- .../io/swagger/client/apis/CommitsApi.kt | 2 +- .../io/swagger/client/apis/ContentApi.kt | 2 +- .../io/swagger/client/apis/ExperimentsApi.kt | 2 +- .../io/swagger/client/apis/IssuesApi.kt | 2 +- .../swagger/client/apis/OrganizationsApi.kt | 46 + .../io/swagger/client/apis/ReleasesApi.kt | 2 +- .../io/swagger/client/apis/RepositoryApi.kt | 2 +- .../client/apis/StorageIntegrationsApi.kt | 9 +- .../kotlin/io/swagger/client/apis/UserApi.kt | 2 +- .../io/swagger/client/apis/WebhooksApi.kt | 2 +- .../io/swagger/client/models/Assignee.kt | 2 +- .../kotlin/io/swagger/client/models/Body.kt | 2 +- .../kotlin/io/swagger/client/models/Closed.kt | 2 +- .../models/Collaborators_collaborator_body.kt | 2 +- .../client/models/CreateAnnotatorTeam.kt | 50 + .../io/swagger/client/models/CreateRepo.kt | 2 +- .../client/models/EditExperimentPost.kt | 2 +- .../swagger/client/models/ExperimentKeys.kt | 2 +- .../kotlin/io/swagger/client/models/Files.kt | 2 +- .../io/swagger/client/models/Files_1.kt | 7 +- .../client/models/GrantLabelStudioAccess.kt | 35 + .../io/swagger/client/models/Hooks_id_body.kt | 2 +- .../client/models/Inline_response_200.kt | 35 + .../io/swagger/client/models/Integration.kt | 2 +- .../client/models/Integration_inner.kt | 2 +- .../kotlin/io/swagger/client/models/Issue.kt | 2 +- .../swagger/client/models/Issue_assignee.kt | 2 +- .../io/swagger/client/models/Issue_labels.kt | 2 +- .../swagger/client/models/Issue_milestone.kt | 2 +- .../kotlin/io/swagger/client/models/Issues.kt | 2 +- .../client/models/LabelStudioProjectAccess.kt | 49 + .../kotlin/io/swagger/client/models/Labels.kt | 2 +- .../io/swagger/client/models/MigrateRepo.kt | 2 +- .../io/swagger/client/models/Milestone.kt | 2 +- .../io/swagger/client/models/PatchIssue.kt | 2 +- .../io/swagger/client/models/PostIssue.kt | 2 +- .../io/swagger/client/models/PutFile.kt | 2 +- .../swagger/client/models/Repo_hooks_body.kt | 2 +- .../kotlin/io/swagger/client/models/State.kt | 2 +- .../kotlin/io/swagger/client/models/Title.kt | 2 +- .../kotlin/io/swagger/client/models/User.kt | 2 +- .../io/swagger/client/models/WebhookConfig.kt | 2 +- .../io/swagger/client/models/WebhookEvents.kt | 2 +- Python/README.md | 170 +- Python/dagshub_api/__init__.py | 8 +- Python/dagshub_api/api/__init__.py | 2 + Python/dagshub_api/api/annotations_api.py | 937 ++++++++ Python/dagshub_api/api/branches_api.py | 2 +- Python/dagshub_api/api/collaborators_api.py | 2 +- Python/dagshub_api/api/commits_api.py | 2 +- Python/dagshub_api/api/content_api.py | 2 +- Python/dagshub_api/api/experiments_api.py | 2 +- Python/dagshub_api/api/issues_api.py | 2 +- Python/dagshub_api/api/organizations_api.py | 136 ++ Python/dagshub_api/api/releases_api.py | 2 +- Python/dagshub_api/api/repository_api.py | 2 +- .../api/storage_integrations_api.py | 12 +- Python/dagshub_api/api/user_api.py | 2 +- Python/dagshub_api/api/webhooks_api.py | 2 +- Python/dagshub_api/api_client.py | 2 +- Python/dagshub_api/configuration.py | 4 +- Python/dagshub_api/models/__init__.py | 6 +- Python/dagshub_api/models/assignee.py | 2 +- Python/dagshub_api/models/body.py | 2 +- Python/dagshub_api/models/closed.py | 2 +- .../models/collaborators_collaborator_body.py | 2 +- .../models/create_annotator_team.py | 209 ++ Python/dagshub_api/models/create_repo.py | 2 +- .../models/edit_experiment_post.py | 2 +- Python/dagshub_api/models/experiment_keys.py | 2 +- Python/dagshub_api/models/file.py | 2 +- Python/dagshub_api/models/files.py | 2 +- Python/dagshub_api/models/files1.py | 32 +- .../models/grant_label_studio_access.py | 147 ++ Python/dagshub_api/models/hooks_id_body.py | 2 +- .../dagshub_api/models/inline_response200.py | 168 ++ Python/dagshub_api/models/integration.py | 2 +- .../dagshub_api/models/integration_inner.py | 2 +- Python/dagshub_api/models/issue.py | 2 +- Python/dagshub_api/models/issue_assignee.py | 2 +- Python/dagshub_api/models/issue_labels.py | 2 +- Python/dagshub_api/models/issue_milestone.py | 2 +- Python/dagshub_api/models/issues.py | 2 +- .../models/label_studio_project_access.py | 304 +++ Python/dagshub_api/models/labels.py | 2 +- Python/dagshub_api/models/migrate_repo.py | 2 +- Python/dagshub_api/models/milestone.py | 2 +- Python/dagshub_api/models/patch_issue.py | 2 +- Python/dagshub_api/models/post_issue.py | 2 +- Python/dagshub_api/models/put_file.py | 2 +- Python/dagshub_api/models/repo_hooks_body.py | 2 +- Python/dagshub_api/models/state.py | 2 +- Python/dagshub_api/models/title.py | 2 +- Python/dagshub_api/models/user.py | 2 +- Python/dagshub_api/models/webhook_config.py | 2 +- Python/dagshub_api/models/webhook_events.py | 2 +- Python/dagshub_api/rest.py | 2 +- Python/docs/AnnotationsApi.md | 511 +++++ Python/docs/CreateAnnotatorTeam.md | 12 + Python/docs/Files1.md | 3 +- Python/docs/GrantLabelStudioAccess.md | 10 + Python/docs/InlineResponse200.md | 11 + Python/docs/LabelStudioProjectAccess.md | 16 + Python/docs/OrganizationsApi.md | 66 + Python/docs/StorageIntegrationsApi.md | 10 +- Python/setup.py | 2 +- Python/test/test_annotations_api.py | 89 + Python/test/test_assignee.py | 2 +- Python/test/test_body.py | 2 +- Python/test/test_branches_api.py | 2 +- Python/test/test_closed.py | 2 +- Python/test/test_collaborators_api.py | 2 +- .../test_collaborators_collaborator_body.py | 2 +- Python/test/test_commits_api.py | 2 +- Python/test/test_content_api.py | 2 +- Python/test/test_create_annotator_team.py | 39 + Python/test/test_create_repo.py | 2 +- Python/test/test_edit_experiment_post.py | 2 +- Python/test/test_experiment_keys.py | 2 +- Python/test/test_experiments_api.py | 2 +- Python/test/test_file.py | 2 +- Python/test/test_files.py | 2 +- Python/test/test_files1.py | 2 +- Python/test/test_grant_label_studio_access.py | 39 + Python/test/test_hooks_id_body.py | 2 +- Python/test/test_inline_response200.py | 39 + Python/test/test_integration.py | 2 +- Python/test/test_integration_inner.py | 2 +- Python/test/test_issue.py | 2 +- Python/test/test_issue_assignee.py | 2 +- Python/test/test_issue_labels.py | 2 +- Python/test/test_issue_milestone.py | 2 +- Python/test/test_issues.py | 2 +- Python/test/test_issues_api.py | 2 +- .../test/test_label_studio_project_access.py | 39 + Python/test/test_labels.py | 2 +- Python/test/test_migrate_repo.py | 2 +- Python/test/test_milestone.py | 2 +- Python/test/test_organizations_api.py | 40 + Python/test/test_patch_issue.py | 2 +- Python/test/test_post_issue.py | 2 +- Python/test/test_put_file.py | 2 +- Python/test/test_releases_api.py | 2 +- Python/test/test_repo_hooks_body.py | 2 +- Python/test/test_repository_api.py | 2 +- Python/test/test_state.py | 2 +- Python/test/test_storage_integrations_api.py | 2 +- Python/test/test_title.py | 2 +- Python/test/test_user.py | 2 +- Python/test/test_user_api.py | 2 +- Python/test/test_webhook_config.py | 2 +- Python/test/test_webhook_events.py | 2 +- Python/test/test_webhooks_api.py | 2 +- R/NAMESPACE | 4 + R/R/AnnotationsApi.r | 368 +++ R/R/ApiClient.r | 2 +- R/R/Assignee.r | 2 +- R/R/Body.r | 2 +- R/R/BranchesApi.r | 2 +- R/R/Closed.r | 2 +- R/R/CollaboratorsApi.r | 2 +- R/R/CollaboratorsCollaboratorBody.r | 2 +- R/R/CommitsApi.r | 2 +- R/R/ContentApi.r | 2 +- R/R/CreateAnnotatorTeam.r | 98 + R/R/CreateRepo.r | 2 +- R/R/EditExperimentPost.r | 2 +- R/R/ExperimentKeys.r | 2 +- R/R/ExperimentsApi.r | 2 +- R/R/Files.r | 2 +- R/R/Files1.r | 19 +- R/R/GrantLabelStudioAccess.r | 68 + R/R/HooksIdBody.r | 2 +- R/R/InlineResponse200.r | 83 + R/R/Integration.r | 2 +- R/R/IntegrationInner.r | 2 +- R/R/Issue.r | 2 +- R/R/IssueAssignee.r | 2 +- R/R/IssueLabels.r | 2 +- R/R/IssueMilestone.r | 2 +- R/R/Issues.r | 2 +- R/R/IssuesApi.r | 2 +- R/R/LabelStudioProjectAccess.r | 161 ++ R/R/Labels.r | 2 +- R/R/MigrateRepo.r | 2 +- R/R/Milestone.r | 2 +- R/R/OrganizationsApi.r | 71 + R/R/PatchIssue.r | 2 +- R/R/PostIssue.r | 2 +- R/R/PutFile.r | 2 +- R/R/ReleasesApi.r | 2 +- R/R/RepoHooksBody.r | 2 +- R/R/RepositoryApi.r | 2 +- R/R/State.r | 2 +- R/R/StorageIntegrationsApi.r | 8 +- R/R/Title.r | 2 +- R/R/User.r | 2 +- R/R/UserApi.r | 2 +- R/R/WebhookConfig.r | 2 +- R/R/WebhookEvents.r | 2 +- R/R/WebhooksApi.r | 2 +- R/README.md | 2 +- Scala/README.md | 15 +- .../scala/io/swagger/client/ApiInvoker.scala | 2 +- .../swagger/client/api/AnnotationsApi.scala | 568 +++++ .../io/swagger/client/api/BranchesApi.scala | 2 +- .../swagger/client/api/CollaboratorsApi.scala | 2 +- .../io/swagger/client/api/CommitsApi.scala | 2 +- .../io/swagger/client/api/ContentApi.scala | 2 +- .../swagger/client/api/ExperimentsApi.scala | 2 +- .../io/swagger/client/api/IssuesApi.scala | 2 +- .../swagger/client/api/OrganizationsApi.scala | 134 ++ .../io/swagger/client/api/ReleasesApi.scala | 2 +- .../io/swagger/client/api/RepositoryApi.scala | 2 +- .../client/api/StorageIntegrationsApi.scala | 21 +- .../scala/io/swagger/client/api/UserApi.scala | 2 +- .../io/swagger/client/api/WebhooksApi.scala | 2 +- .../io/swagger/client/model/Assignee.scala | 2 +- .../scala/io/swagger/client/model/Body.scala | 2 +- .../io/swagger/client/model/Closed.scala | 2 +- .../model/CollaboratorsCollaboratorBody.scala | 2 +- .../client/model/CreateAnnotatorTeam.scala | 27 + .../io/swagger/client/model/CreateRepo.scala | 2 +- .../client/model/EditExperimentPost.scala | 2 +- .../swagger/client/model/ExperimentKeys.scala | 2 +- .../scala/io/swagger/client/model/Files.scala | 2 +- .../io/swagger/client/model/Files1.scala | 6 +- .../client/model/GrantLabelStudioAccess.scala | 23 + .../io/swagger/client/model/HooksIdBody.scala | 2 +- .../client/model/InlineResponse200.scala | 25 + .../io/swagger/client/model/Integration.scala | 2 +- .../client/model/IntegrationInner.scala | 2 +- .../scala/io/swagger/client/model/Issue.scala | 2 +- .../swagger/client/model/IssueAssignee.scala | 2 +- .../io/swagger/client/model/IssueLabels.scala | 2 +- .../swagger/client/model/IssueMilestone.scala | 2 +- .../io/swagger/client/model/Issues.scala | 2 +- .../model/LabelStudioProjectAccess.scala | 35 + .../io/swagger/client/model/Labels.scala | 2 +- .../io/swagger/client/model/MigrateRepo.scala | 2 +- .../io/swagger/client/model/Milestone.scala | 2 +- .../io/swagger/client/model/PatchIssue.scala | 2 +- .../io/swagger/client/model/PostIssue.scala | 2 +- .../io/swagger/client/model/PutFile.scala | 2 +- .../swagger/client/model/RepoHooksBody.scala | 2 +- .../scala/io/swagger/client/model/State.scala | 2 +- .../scala/io/swagger/client/model/Title.scala | 2 +- .../scala/io/swagger/client/model/User.scala | 2 +- .../swagger/client/model/WebhookConfig.scala | 2 +- .../swagger/client/model/WebhookEvents.scala | 2 +- .../Swaggers/APIs/AnnotationsAPI.swift | 544 +++++ .../Swaggers/APIs/OrganizationsAPI.swift | 60 + .../APIs/StorageIntegrationsAPI.swift | 14 +- .../Swaggers/Models/CreateAnnotatorTeam.swift | 46 + .../Classes/Swaggers/Models/Files1.swift | 6 +- .../Models/GrantLabelStudioAccess.swift | 33 + .../Swaggers/Models/InlineResponse200.swift | 34 + .../Models/LabelStudioProjectAccess.swift | 52 + TypeScript/api.ts | 6 +- TypeScript/apis/annotations-api.ts | 934 ++++++++ TypeScript/apis/branches-api.ts | 2 +- TypeScript/apis/collaborators-api.ts | 2 +- TypeScript/apis/commits-api.ts | 2 +- TypeScript/apis/content-api.ts | 2 +- TypeScript/apis/experiments-api.ts | 2 +- TypeScript/apis/issues-api.ts | 2 +- TypeScript/apis/organizations-api.ts | 151 ++ TypeScript/apis/releases-api.ts | 2 +- TypeScript/apis/repository-api.ts | 2 +- TypeScript/apis/storage-integrations-api.ts | 32 +- TypeScript/apis/user-api.ts | 2 +- TypeScript/apis/webhooks-api.ts | 2 +- TypeScript/base.ts | 2 +- TypeScript/configuration.ts | 2 +- TypeScript/index.ts | 2 +- TypeScript/models/assignee.ts | 2 +- TypeScript/models/body.ts | 2 +- TypeScript/models/closed.ts | 2 +- .../models/collaborators-collaborator-body.ts | 2 +- TypeScript/models/create-annotator-team.ts | 63 + TypeScript/models/create-repo.ts | 2 +- TypeScript/models/edit-experiment-post.ts | 2 +- TypeScript/models/experiment-keys.ts | 2 +- TypeScript/models/files.ts | 2 +- TypeScript/models/files1.ts | 10 +- .../models/grant-label-studio-access.ts | 42 + TypeScript/models/hooks-id-body.ts | 2 +- TypeScript/models/index.ts | 4 + TypeScript/models/inline-response200.ts | 48 + TypeScript/models/integration-inner.ts | 2 +- TypeScript/models/integration.ts | 2 +- TypeScript/models/issue-assignee.ts | 2 +- TypeScript/models/issue-labels.ts | 2 +- TypeScript/models/issue-milestone.ts | 2 +- TypeScript/models/issue.ts | 2 +- TypeScript/models/issues.ts | 2 +- .../models/label-studio-project-access.ts | 79 + TypeScript/models/labels.ts | 2 +- TypeScript/models/migrate-repo.ts | 2 +- TypeScript/models/milestone.ts | 2 +- TypeScript/models/model-file.ts | 2 +- TypeScript/models/patch-issue.ts | 2 +- TypeScript/models/post-issue.ts | 2 +- TypeScript/models/put-file.ts | 2 +- TypeScript/models/repo-hooks-body.ts | 2 +- TypeScript/models/state.ts | 2 +- TypeScript/models/title.ts | 2 +- TypeScript/models/user.ts | 2 +- TypeScript/models/webhook-config.ts | 2 +- TypeScript/models/webhook-events.ts | 2 +- 663 files changed, 20827 insertions(+), 874 deletions(-) create mode 100644 C#/docs/AnnotationsApi.md create mode 100644 C#/docs/CreateAnnotatorTeam.md create mode 100644 C#/docs/GrantLabelStudioAccess.md create mode 100644 C#/docs/InlineResponse200.md create mode 100644 C#/docs/LabelStudioProjectAccess.md create mode 100644 C#/docs/OrganizationsApi.md create mode 100644 C#/src/dagshub_api.Test/Api/AnnotationsApiTests.cs create mode 100644 C#/src/dagshub_api.Test/Api/OrganizationsApiTests.cs create mode 100644 C#/src/dagshub_api.Test/Model/CreateAnnotatorTeamTests.cs create mode 100644 C#/src/dagshub_api.Test/Model/GrantLabelStudioAccessTests.cs create mode 100644 C#/src/dagshub_api.Test/Model/InlineResponse200Tests.cs create mode 100644 C#/src/dagshub_api.Test/Model/LabelStudioProjectAccessTests.cs create mode 100644 C#/src/dagshub_api/Api/AnnotationsApi.cs create mode 100644 C#/src/dagshub_api/Api/OrganizationsApi.cs create mode 100644 C#/src/dagshub_api/Model/CreateAnnotatorTeam.cs create mode 100644 C#/src/dagshub_api/Model/GrantLabelStudioAccess.cs create mode 100644 C#/src/dagshub_api/Model/InlineResponse200.cs create mode 100644 C#/src/dagshub_api/Model/LabelStudioProjectAccess.cs create mode 100644 Go/api_annotations.go create mode 100644 Go/api_organizations.go create mode 100644 Go/docs/AnnotationsApi.md create mode 100644 Go/docs/CreateAnnotatorTeam.md create mode 100644 Go/docs/GrantLabelStudioAccess.md create mode 100644 Go/docs/InlineResponse200.md create mode 100644 Go/docs/LabelStudioProjectAccess.md create mode 100644 Go/docs/OrganizationsApi.md create mode 100644 Go/model_create_annotator_team.go create mode 100644 Go/model_grant_label_studio_access.go create mode 100644 Go/model_inline_response_200.go create mode 100644 Go/model_label_studio_project_access.go create mode 100644 Java/docs/AnnotationsApi.md create mode 100644 Java/docs/CreateAnnotatorTeam.md create mode 100644 Java/docs/GrantLabelStudioAccess.md create mode 100644 Java/docs/InlineResponse200.md create mode 100644 Java/docs/LabelStudioProjectAccess.md create mode 100644 Java/docs/OrganizationsApi.md create mode 100644 Java/src/main/java/io/swagger/client/api/AnnotationsApi.java create mode 100644 Java/src/main/java/io/swagger/client/api/OrganizationsApi.java create mode 100644 Java/src/main/java/io/swagger/client/model/CreateAnnotatorTeam.java create mode 100644 Java/src/main/java/io/swagger/client/model/GrantLabelStudioAccess.java create mode 100644 Java/src/main/java/io/swagger/client/model/InlineResponse200.java create mode 100644 Java/src/main/java/io/swagger/client/model/LabelStudioProjectAccess.java create mode 100644 Java/src/test/java/io/swagger/client/api/AnnotationsApiTest.java create mode 100644 Java/src/test/java/io/swagger/client/api/OrganizationsApiTest.java create mode 100644 JavaScript/docs/AnnotationsApi.md create mode 100644 JavaScript/docs/CreateAnnotatorTeam.md create mode 100644 JavaScript/docs/GrantLabelStudioAccess.md create mode 100644 JavaScript/docs/InlineResponse200.md create mode 100644 JavaScript/docs/LabelStudioProjectAccess.md create mode 100644 JavaScript/docs/OrganizationsApi.md create mode 100644 JavaScript/src/api/AnnotationsApi.js create mode 100644 JavaScript/src/api/OrganizationsApi.js create mode 100644 JavaScript/src/model/CreateAnnotatorTeam.js create mode 100644 JavaScript/src/model/GrantLabelStudioAccess.js create mode 100644 JavaScript/src/model/InlineResponse200.js create mode 100644 JavaScript/src/model/LabelStudioProjectAccess.js create mode 100644 JavaScript/test/api/AnnotationsApi.spec.js create mode 100644 JavaScript/test/api/OrganizationsApi.spec.js create mode 100644 JavaScript/test/model/CreateAnnotatorTeam.spec.js create mode 100644 JavaScript/test/model/GrantLabelStudioAccess.spec.js create mode 100644 JavaScript/test/model/InlineResponse200.spec.js create mode 100644 JavaScript/test/model/LabelStudioProjectAccess.spec.js create mode 100644 Kotlin/docs/AnnotationsApi.md create mode 100644 Kotlin/docs/CreateAnnotatorTeam.md create mode 100644 Kotlin/docs/GrantLabelStudioAccess.md create mode 100644 Kotlin/docs/Inline_response_200.md create mode 100644 Kotlin/docs/LabelStudioProjectAccess.md create mode 100644 Kotlin/docs/OrganizationsApi.md create mode 100644 Kotlin/src/main/kotlin/io/swagger/client/apis/AnnotationsApi.kt create mode 100644 Kotlin/src/main/kotlin/io/swagger/client/apis/OrganizationsApi.kt create mode 100644 Kotlin/src/main/kotlin/io/swagger/client/models/CreateAnnotatorTeam.kt create mode 100644 Kotlin/src/main/kotlin/io/swagger/client/models/GrantLabelStudioAccess.kt create mode 100644 Kotlin/src/main/kotlin/io/swagger/client/models/Inline_response_200.kt create mode 100644 Kotlin/src/main/kotlin/io/swagger/client/models/LabelStudioProjectAccess.kt create mode 100644 Python/dagshub_api/api/annotations_api.py create mode 100644 Python/dagshub_api/api/organizations_api.py create mode 100644 Python/dagshub_api/models/create_annotator_team.py create mode 100644 Python/dagshub_api/models/grant_label_studio_access.py create mode 100644 Python/dagshub_api/models/inline_response200.py create mode 100644 Python/dagshub_api/models/label_studio_project_access.py create mode 100644 Python/docs/AnnotationsApi.md create mode 100644 Python/docs/CreateAnnotatorTeam.md create mode 100644 Python/docs/GrantLabelStudioAccess.md create mode 100644 Python/docs/InlineResponse200.md create mode 100644 Python/docs/LabelStudioProjectAccess.md create mode 100644 Python/docs/OrganizationsApi.md create mode 100644 Python/test/test_annotations_api.py create mode 100644 Python/test/test_create_annotator_team.py create mode 100644 Python/test/test_grant_label_studio_access.py create mode 100644 Python/test/test_inline_response200.py create mode 100644 Python/test/test_label_studio_project_access.py create mode 100644 Python/test/test_organizations_api.py create mode 100644 R/R/AnnotationsApi.r create mode 100644 R/R/CreateAnnotatorTeam.r create mode 100644 R/R/GrantLabelStudioAccess.r create mode 100644 R/R/InlineResponse200.r create mode 100644 R/R/LabelStudioProjectAccess.r create mode 100644 R/R/OrganizationsApi.r create mode 100644 Scala/src/main/scala/io/swagger/client/api/AnnotationsApi.scala create mode 100644 Scala/src/main/scala/io/swagger/client/api/OrganizationsApi.scala create mode 100644 Scala/src/main/scala/io/swagger/client/model/CreateAnnotatorTeam.scala create mode 100644 Scala/src/main/scala/io/swagger/client/model/GrantLabelStudioAccess.scala create mode 100644 Scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala create mode 100644 Scala/src/main/scala/io/swagger/client/model/LabelStudioProjectAccess.scala create mode 100644 Swift/SwaggerClient/Classes/Swaggers/APIs/AnnotationsAPI.swift create mode 100644 Swift/SwaggerClient/Classes/Swaggers/APIs/OrganizationsAPI.swift create mode 100644 Swift/SwaggerClient/Classes/Swaggers/Models/CreateAnnotatorTeam.swift create mode 100644 Swift/SwaggerClient/Classes/Swaggers/Models/GrantLabelStudioAccess.swift create mode 100644 Swift/SwaggerClient/Classes/Swaggers/Models/InlineResponse200.swift create mode 100644 Swift/SwaggerClient/Classes/Swaggers/Models/LabelStudioProjectAccess.swift create mode 100644 TypeScript/apis/annotations-api.ts create mode 100644 TypeScript/apis/organizations-api.ts create mode 100644 TypeScript/models/create-annotator-team.ts create mode 100644 TypeScript/models/grant-label-studio-access.ts create mode 100644 TypeScript/models/inline-response200.ts create mode 100644 TypeScript/models/label-studio-project-access.ts diff --git a/C#/README.md b/C#/README.md index 1ede481..d9a139d 100644 --- a/C#/README.md +++ b/C#/README.md @@ -4,7 +4,7 @@ This API provides a way to retrive & interact with data about DagsHub repositori This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API version: 1.0.2 +- API version: 1.0.3 - SDK version: 1.0.3 - Build package: io.swagger.codegen.v3.generators.dotnet.CSharpClientCodegen @@ -77,19 +77,21 @@ namespace Example // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer"); - var apiInstance = new BranchesApi(); + var apiInstance = new AnnotationsApi(); var owner = owner_example; // string | owner of the repository var repo = repo_example; // string | name of the repository - var branch = branch_example; // string | branch of the repository + var teamid = 789; // long? | Team ID + var projectId = 789; // long? | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) try { - // Get Branch - apiInstance.GetBranch(owner, repo, branch); + // Get team access level for annotation projects + LabelStudioProjectAccess result = apiInstance.GetLabelStudioTeamAccess(owner, repo, teamid, projectId); + Debug.WriteLine(result); } catch (Exception e) { - Debug.Print("Exception when calling BranchesApi.GetBranch: " + e.Message ); + Debug.Print("Exception when calling AnnotationsApi.GetLabelStudioTeamAccess: " + e.Message ); } } } @@ -103,6 +105,14 @@ All URIs are relative to *https://dagshub.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AnnotationsApi* | [**GetLabelStudioTeamAccess**](docs/AnnotationsApi.md#getlabelstudioteamaccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +*AnnotationsApi* | [**GetLabelStudioUserAccess**](docs/AnnotationsApi.md#getlabelstudiouseraccess) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +*AnnotationsApi* | [**GrantLabelStudioTeamAccess**](docs/AnnotationsApi.md#grantlabelstudioteamaccess) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +*AnnotationsApi* | [**GrantLabelStudioUserAccess**](docs/AnnotationsApi.md#grantlabelstudiouseraccess) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +*AnnotationsApi* | [**ListLabelStudioTeamAccess**](docs/AnnotationsApi.md#listlabelstudioteamaccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +*AnnotationsApi* | [**ListLabelStudioUserAccess**](docs/AnnotationsApi.md#listlabelstudiouseraccess) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +*AnnotationsApi* | [**RevokeLabelStudioTeamAccess**](docs/AnnotationsApi.md#revokelabelstudioteamaccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +*AnnotationsApi* | [**RevokeLabelStudioUserAccess**](docs/AnnotationsApi.md#revokelabelstudiouseraccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects *BranchesApi* | [**GetBranch**](docs/BranchesApi.md#getbranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch *BranchesApi* | [**ListBranches**](docs/BranchesApi.md#listbranches) | **GET** /repos/{owner}/{repo}/branches | List Branches *CollaboratorsApi* | [**AddCollaborator**](docs/CollaboratorsApi.md#addcollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator @@ -123,6 +133,7 @@ Class | Method | HTTP request | Description *IssuesApi* | [**EditIssue**](docs/IssuesApi.md#editissue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue *IssuesApi* | [**GetIssue**](docs/IssuesApi.md#getissue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue *IssuesApi* | [**ListRepoIssues**](docs/IssuesApi.md#listrepoissues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository +*OrganizationsApi* | [**CreateOrgTeam**](docs/OrganizationsApi.md#createorgteam) | **POST** /admin/orgs/{orgname}/teams | Create an organization team *ReleasesApi* | [**ListReleases**](docs/ReleasesApi.md#listreleases) | **GET** /repos/{owner}/{repo}/releases | List Releases *RepositoryApi* | [**CreateOrgRepo**](docs/RepositoryApi.md#createorgrepo) | **POST** /org/{orgname}/repos | Create in organization *RepositoryApi* | [**CreateRepo**](docs/RepositoryApi.md#createrepo) | **POST** /user/repos | Create @@ -146,13 +157,16 @@ Class | Method | HTTP request | Description ## Documentation for Models - [Model.CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) + - [Model.CreateAnnotatorTeam](docs/CreateAnnotatorTeam.md) - [Model.CreateRepo](docs/CreateRepo.md) - [Model.EditExperimentPost](docs/EditExperimentPost.md) - [Model.ExperimentKeys](docs/ExperimentKeys.md) - [Model.File](docs/File.md) - [Model.Files](docs/Files.md) - [Model.Files1](docs/Files1.md) + - [Model.GrantLabelStudioAccess](docs/GrantLabelStudioAccess.md) - [Model.HooksIdBody](docs/HooksIdBody.md) + - [Model.InlineResponse200](docs/InlineResponse200.md) - [Model.Integration](docs/Integration.md) - [Model.IntegrationInner](docs/IntegrationInner.md) - [Model.Issue](docs/Issue.md) @@ -160,6 +174,7 @@ Class | Method | HTTP request | Description - [Model.IssueLabels](docs/IssueLabels.md) - [Model.IssueMilestone](docs/IssueMilestone.md) - [Model.Issues](docs/Issues.md) + - [Model.LabelStudioProjectAccess](docs/LabelStudioProjectAccess.md) - [Model.Labels](docs/Labels.md) - [Model.MigrateRepo](docs/MigrateRepo.md) - [Model.PatchIssue](docs/PatchIssue.md) diff --git a/C#/dagshub_api.sln b/C#/dagshub_api.sln index 1485d6a..741a78a 100644 --- a/C#/dagshub_api.sln +++ b/C#/dagshub_api.sln @@ -2,7 +2,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 VisualStudioVersion = 12.0.0.0 MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dagshub_api", "src\dagshub_api\dagshub_api.csproj", "{BB7FDD9F-1657-4C83-B5E3-E416BEC4C698}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dagshub_api", "src\dagshub_api\dagshub_api.csproj", "{DC4E8379-1DB2-416F-B33C-82A82758E481}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dagshub_api.Test", "src\dagshub_api.Test\dagshub_api.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" EndProject @@ -12,10 +12,10 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698}.Release|Any CPU.Build.0 = Release|Any CPU + {DC4E8379-1DB2-416F-B33C-82A82758E481}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DC4E8379-1DB2-416F-B33C-82A82758E481}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC4E8379-1DB2-416F-B33C-82A82758E481}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DC4E8379-1DB2-416F-B33C-82A82758E481}.Release|Any CPU.Build.0 = Release|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/C#/docs/AnnotationsApi.md b/C#/docs/AnnotationsApi.md new file mode 100644 index 0000000..c0f12d1 --- /dev/null +++ b/C#/docs/AnnotationsApi.md @@ -0,0 +1,599 @@ +# dagshub_api.Api.AnnotationsApi + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetLabelStudioTeamAccess**](AnnotationsApi.md#getlabelstudioteamaccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +[**GetLabelStudioUserAccess**](AnnotationsApi.md#getlabelstudiouseraccess) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +[**GrantLabelStudioTeamAccess**](AnnotationsApi.md#grantlabelstudioteamaccess) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +[**GrantLabelStudioUserAccess**](AnnotationsApi.md#grantlabelstudiouseraccess) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +[**ListLabelStudioTeamAccess**](AnnotationsApi.md#listlabelstudioteamaccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +[**ListLabelStudioUserAccess**](AnnotationsApi.md#listlabelstudiouseraccess) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +[**RevokeLabelStudioTeamAccess**](AnnotationsApi.md#revokelabelstudioteamaccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +[**RevokeLabelStudioUserAccess**](AnnotationsApi.md#revokelabelstudiouseraccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects + + +# **GetLabelStudioTeamAccess** +> LabelStudioProjectAccess GetLabelStudioTeamAccess (string owner, string repo, long? teamid, long? projectId = null) + +Get team access level for annotation projects + +Get the access level for a specific team and project (or all projects) + +### Example +```csharp +using System; +using System.Diagnostics; +using dagshub_api.Api; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace Example +{ + public class GetLabelStudioTeamAccessExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + // Configure API key authorization: tokenAuth + Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); + + var apiInstance = new AnnotationsApi(); + var owner = owner_example; // string | owner of the repository + var repo = repo_example; // string | name of the repository + var teamid = 789; // long? | Team ID + var projectId = 789; // long? | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + try + { + // Get team access level for annotation projects + LabelStudioProjectAccess result = apiInstance.GetLabelStudioTeamAccess(owner, repo, teamid, projectId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AnnotationsApi.GetLabelStudioTeamAccess: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **teamid** | **long?**| Team ID | + **projectId** | **long?**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**LabelStudioProjectAccess**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetLabelStudioUserAccess** +> InlineResponse200 GetLabelStudioUserAccess (string owner, string repo, long? userid, long? projectId = null) + +Get user access level for annotation projects + +Get the access level for a specific user and project (or all projects) + +### Example +```csharp +using System; +using System.Diagnostics; +using dagshub_api.Api; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace Example +{ + public class GetLabelStudioUserAccessExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + // Configure API key authorization: tokenAuth + Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); + + var apiInstance = new AnnotationsApi(); + var owner = owner_example; // string | owner of the repository + var repo = repo_example; // string | name of the repository + var userid = 789; // long? | User ID + var projectId = 789; // long? | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + try + { + // Get user access level for annotation projects + InlineResponse200 result = apiInstance.GetLabelStudioUserAccess(owner, repo, userid, projectId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AnnotationsApi.GetLabelStudioUserAccess: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **userid** | **long?**| User ID | + **projectId** | **long?**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GrantLabelStudioTeamAccess** +> void GrantLabelStudioTeamAccess (GrantLabelStudioAccess body, string owner, string repo, long? teamid) + +Grant team access to annotation projects + +Grant a team access to specific Label Studio annotation projects (organization repositories only) + +### Example +```csharp +using System; +using System.Diagnostics; +using dagshub_api.Api; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace Example +{ + public class GrantLabelStudioTeamAccessExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + // Configure API key authorization: tokenAuth + Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); + + var apiInstance = new AnnotationsApi(); + var body = new GrantLabelStudioAccess(); // GrantLabelStudioAccess | + var owner = owner_example; // string | owner of the repository + var repo = repo_example; // string | name of the repository + var teamid = 789; // long? | Team ID + + try + { + // Grant team access to annotation projects + apiInstance.GrantLabelStudioTeamAccess(body, owner, repo, teamid); + } + catch (Exception e) + { + Debug.Print("Exception when calling AnnotationsApi.GrantLabelStudioTeamAccess: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **teamid** | **long?**| Team ID | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GrantLabelStudioUserAccess** +> void GrantLabelStudioUserAccess (GrantLabelStudioAccess body, string owner, string repo, long? userid) + +Grant user access to annotation projects + +Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + +### Example +```csharp +using System; +using System.Diagnostics; +using dagshub_api.Api; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace Example +{ + public class GrantLabelStudioUserAccessExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + // Configure API key authorization: tokenAuth + Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); + + var apiInstance = new AnnotationsApi(); + var body = new GrantLabelStudioAccess(); // GrantLabelStudioAccess | + var owner = owner_example; // string | owner of the repository + var repo = repo_example; // string | name of the repository + var userid = 789; // long? | User ID + + try + { + // Grant user access to annotation projects + apiInstance.GrantLabelStudioUserAccess(body, owner, repo, userid); + } + catch (Exception e) + { + Debug.Print("Exception when calling AnnotationsApi.GrantLabelStudioUserAccess: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **userid** | **long?**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListLabelStudioTeamAccess** +> List ListLabelStudioTeamAccess (string owner, string repo, long? projectId = null) + +List team access entries for annotation projects + +Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + +### Example +```csharp +using System; +using System.Diagnostics; +using dagshub_api.Api; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace Example +{ + public class ListLabelStudioTeamAccessExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + // Configure API key authorization: tokenAuth + Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); + + var apiInstance = new AnnotationsApi(); + var owner = owner_example; // string | owner of the repository + var repo = repo_example; // string | name of the repository + var projectId = 789; // long? | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + try + { + // List team access entries for annotation projects + List<LabelStudioProjectAccess> result = apiInstance.ListLabelStudioTeamAccess(owner, repo, projectId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AnnotationsApi.ListLabelStudioTeamAccess: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **projectId** | **long?**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**List**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListLabelStudioUserAccess** +> List ListLabelStudioUserAccess (string owner, string repo, long? projectId = null) + +List user access entries for annotation projects + +Get a list of users with access to Label Studio annotation projects in the repository + +### Example +```csharp +using System; +using System.Diagnostics; +using dagshub_api.Api; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace Example +{ + public class ListLabelStudioUserAccessExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + // Configure API key authorization: tokenAuth + Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); + + var apiInstance = new AnnotationsApi(); + var owner = owner_example; // string | owner of the repository + var repo = repo_example; // string | name of the repository + var projectId = 789; // long? | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + try + { + // List user access entries for annotation projects + List<LabelStudioProjectAccess> result = apiInstance.ListLabelStudioUserAccess(owner, repo, projectId); + Debug.WriteLine(result); + } + catch (Exception e) + { + Debug.Print("Exception when calling AnnotationsApi.ListLabelStudioUserAccess: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **projectId** | **long?**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**List**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RevokeLabelStudioTeamAccess** +> void RevokeLabelStudioTeamAccess (string owner, string repo, long? teamid, long? projectId = null) + +Revoke team access to annotation projects + +Revoke a team's access to Label Studio annotation projects + +### Example +```csharp +using System; +using System.Diagnostics; +using dagshub_api.Api; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace Example +{ + public class RevokeLabelStudioTeamAccessExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + // Configure API key authorization: tokenAuth + Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); + + var apiInstance = new AnnotationsApi(); + var owner = owner_example; // string | owner of the repository + var repo = repo_example; // string | name of the repository + var teamid = 789; // long? | Team ID + var projectId = 789; // long? | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + try + { + // Revoke team access to annotation projects + apiInstance.RevokeLabelStudioTeamAccess(owner, repo, teamid, projectId); + } + catch (Exception e) + { + Debug.Print("Exception when calling AnnotationsApi.RevokeLabelStudioTeamAccess: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **teamid** | **long?**| Team ID | + **projectId** | **long?**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RevokeLabelStudioUserAccess** +> void RevokeLabelStudioUserAccess (string owner, string repo, long? userid, long? projectId = null) + +Revoke user access to annotation projects + +Revoke a user's access to Label Studio annotation projects + +### Example +```csharp +using System; +using System.Diagnostics; +using dagshub_api.Api; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace Example +{ + public class RevokeLabelStudioUserAccessExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + // Configure API key authorization: tokenAuth + Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); + + var apiInstance = new AnnotationsApi(); + var owner = owner_example; // string | owner of the repository + var repo = repo_example; // string | name of the repository + var userid = 789; // long? | User ID + var projectId = 789; // long? | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + try + { + // Revoke user access to annotation projects + apiInstance.RevokeLabelStudioUserAccess(owner, repo, userid, projectId); + } + catch (Exception e) + { + Debug.Print("Exception when calling AnnotationsApi.RevokeLabelStudioUserAccess: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **userid** | **long?**| User ID | + **projectId** | **long?**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/CreateAnnotatorTeam.md b/C#/docs/CreateAnnotatorTeam.md new file mode 100644 index 0000000..07cc06c --- /dev/null +++ b/C#/docs/CreateAnnotatorTeam.md @@ -0,0 +1,12 @@ +# dagshub_api.Model.CreateAnnotatorTeam +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Team name | +**Description** | **string** | Team description | [optional] +**TeamType** | **string** | Type of team - normal teams have repository access, annotator teams only have annotation project access | [optional] [default to TeamTypeEnum.Normal] +**Permission** | **string** | Repository permission level (required for normal teams, ignored for annotator teams) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/C#/docs/Files1.md b/C#/docs/Files1.md index ce8739d..349f969 100644 --- a/C#/docs/Files1.md +++ b/C#/docs/Files1.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Entries** | **List<System.IO.Stream>** | | [optional] -**Limit** | **int?** | | [optional] -**NextToken** | **string** | | [optional] +**NextToken** | **string** | Next token to continue pagination from | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/C#/docs/GrantLabelStudioAccess.md b/C#/docs/GrantLabelStudioAccess.md new file mode 100644 index 0000000..febe523 --- /dev/null +++ b/C#/docs/GrantLabelStudioAccess.md @@ -0,0 +1,10 @@ +# dagshub_api.Model.GrantLabelStudioAccess +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProjectId** | **long?** | Project ID, -1 for wildcard access to all projects | +**AccessLevel** | **string** | Access level to grant | [optional] [default to AccessLevelEnum.Annotator] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/C#/docs/InlineResponse200.md b/C#/docs/InlineResponse200.md new file mode 100644 index 0000000..32469cb --- /dev/null +++ b/C#/docs/InlineResponse200.md @@ -0,0 +1,11 @@ +# dagshub_api.Model.InlineResponse200 +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserId** | **long?** | | [optional] +**ProjectId** | **long?** | | [optional] +**AccessLevel** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/C#/docs/LabelStudioProjectAccess.md b/C#/docs/LabelStudioProjectAccess.md new file mode 100644 index 0000000..00af554 --- /dev/null +++ b/C#/docs/LabelStudioProjectAccess.md @@ -0,0 +1,16 @@ +# dagshub_api.Model.LabelStudioProjectAccess +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **long?** | | [optional] +**RepoId** | **long?** | | [optional] +**ProjectId** | **long?** | Project ID, -1 means wildcard access to all projects | [optional] +**UserId** | **long?** | User ID (present for user access entries) | [optional] +**TeamId** | **long?** | Team ID (present for team access entries) | [optional] +**AccessLevel** | **string** | | [optional] +**CreatedUnix** | **long?** | | [optional] +**User** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/C#/docs/OrganizationsApi.md b/C#/docs/OrganizationsApi.md new file mode 100644 index 0000000..882e234 --- /dev/null +++ b/C#/docs/OrganizationsApi.md @@ -0,0 +1,77 @@ +# dagshub_api.Api.OrganizationsApi + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateOrgTeam**](OrganizationsApi.md#createorgteam) | **POST** /admin/orgs/{orgname}/teams | Create an organization team + + +# **CreateOrgTeam** +> void CreateOrgTeam (CreateAnnotatorTeam body, string orgname) + +Create an organization team + +Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + +### Example +```csharp +using System; +using System.Diagnostics; +using dagshub_api.Api; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace Example +{ + public class CreateOrgTeamExample + { + public void main() + { + // Configure HTTP basic authorization: basicAuth + Configuration.Default.Username = "YOUR_USERNAME"; + Configuration.Default.Password = "YOUR_PASSWORD"; + // Configure API key authorization: tokenAuth + Configuration.Default.AddApiKey("token", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // Configuration.Default.AddApiKeyPrefix("token", "Bearer"); + + var apiInstance = new OrganizationsApi(); + var body = new CreateAnnotatorTeam(); // CreateAnnotatorTeam | + var orgname = orgname_example; // string | A DagsHub organization name + + try + { + // Create an organization team + apiInstance.CreateOrgTeam(body, orgname); + } + catch (Exception e) + { + Debug.Print("Exception when calling OrganizationsApi.CreateOrgTeam: " + e.Message ); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateAnnotatorTeam**](CreateAnnotatorTeam.md)| | + **orgname** | **string**| A DagsHub organization name | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/C#/docs/StorageIntegrationsApi.md b/C#/docs/StorageIntegrationsApi.md index c300e3a..01c1ea6 100644 --- a/C#/docs/StorageIntegrationsApi.md +++ b/C#/docs/StorageIntegrationsApi.md @@ -10,7 +10,7 @@ Method | HTTP request | Description # **GetBucketContent** -> Files1 GetBucketContent (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null) +> Files1 GetBucketContent (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, bool? paging = null, string fromToken = null) List contents in the path @@ -44,12 +44,13 @@ namespace Example var path = path_example; // string | path of a folder in the repository var includeSize = true; // bool? | (optional) (default to false) var limit = 56; // int? | Maximum amount of items to return (optional) (default to 100) - var fromToken = fromToken_example; // string | Token, from which to continue iteration (optional) + var paging = true; // bool? | Whether or not paging is enabled (optional) (default to false) + var fromToken = fromToken_example; // string | [Only if paging is enabled] token, from which to continue iteration (optional) try { // List contents in the path - Files1 result = apiInstance.GetBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); + Files1 result = apiInstance.GetBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken); Debug.WriteLine(result); } catch (Exception e) @@ -72,7 +73,8 @@ Name | Type | Description | Notes **path** | **string**| path of a folder in the repository | **includeSize** | **bool?**| | [optional] [default to false] **limit** | **int?**| Maximum amount of items to return | [optional] [default to 100] - **fromToken** | **string**| Token, from which to continue iteration | [optional] + **paging** | **bool?**| Whether or not paging is enabled | [optional] [default to false] + **fromToken** | **string**| [Only if paging is enabled] token, from which to continue iteration | [optional] ### Return type diff --git a/C#/src/dagshub_api.Test/Api/AnnotationsApiTests.cs b/C#/src/dagshub_api.Test/Api/AnnotationsApiTests.cs new file mode 100644 index 0000000..b3c1a3b --- /dev/null +++ b/C#/src/dagshub_api.Test/Api/AnnotationsApiTests.cs @@ -0,0 +1,177 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using dagshub_api.Client; +using dagshub_api.Api; +using dagshub_api.Model; + +namespace dagshub_api.Test +{ + /// + /// Class for testing AnnotationsApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class AnnotationsApiTests + { + private AnnotationsApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new AnnotationsApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of AnnotationsApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' AnnotationsApi + //Assert.IsInstanceOfType(typeof(AnnotationsApi), instance, "instance is a AnnotationsApi"); + } + + /// + /// Test GetLabelStudioTeamAccess + /// + [Test] + public void GetLabelStudioTeamAccessTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string owner = null; + //string repo = null; + //long? teamid = null; + //long? projectId = null; + //var response = instance.GetLabelStudioTeamAccess(owner, repo, teamid, projectId); + //Assert.IsInstanceOf (response, "response is LabelStudioProjectAccess"); + } + /// + /// Test GetLabelStudioUserAccess + /// + [Test] + public void GetLabelStudioUserAccessTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string owner = null; + //string repo = null; + //long? userid = null; + //long? projectId = null; + //var response = instance.GetLabelStudioUserAccess(owner, repo, userid, projectId); + //Assert.IsInstanceOf (response, "response is InlineResponse200"); + } + /// + /// Test GrantLabelStudioTeamAccess + /// + [Test] + public void GrantLabelStudioTeamAccessTest() + { + // TODO uncomment below to test the method and replace null with proper value + //GrantLabelStudioAccess body = null; + //string owner = null; + //string repo = null; + //long? teamid = null; + //instance.GrantLabelStudioTeamAccess(body, owner, repo, teamid); + + } + /// + /// Test GrantLabelStudioUserAccess + /// + [Test] + public void GrantLabelStudioUserAccessTest() + { + // TODO uncomment below to test the method and replace null with proper value + //GrantLabelStudioAccess body = null; + //string owner = null; + //string repo = null; + //long? userid = null; + //instance.GrantLabelStudioUserAccess(body, owner, repo, userid); + + } + /// + /// Test ListLabelStudioTeamAccess + /// + [Test] + public void ListLabelStudioTeamAccessTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string owner = null; + //string repo = null; + //long? projectId = null; + //var response = instance.ListLabelStudioTeamAccess(owner, repo, projectId); + //Assert.IsInstanceOf> (response, "response is List"); + } + /// + /// Test ListLabelStudioUserAccess + /// + [Test] + public void ListLabelStudioUserAccessTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string owner = null; + //string repo = null; + //long? projectId = null; + //var response = instance.ListLabelStudioUserAccess(owner, repo, projectId); + //Assert.IsInstanceOf> (response, "response is List"); + } + /// + /// Test RevokeLabelStudioTeamAccess + /// + [Test] + public void RevokeLabelStudioTeamAccessTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string owner = null; + //string repo = null; + //long? teamid = null; + //long? projectId = null; + //instance.RevokeLabelStudioTeamAccess(owner, repo, teamid, projectId); + + } + /// + /// Test RevokeLabelStudioUserAccess + /// + [Test] + public void RevokeLabelStudioUserAccessTest() + { + // TODO uncomment below to test the method and replace null with proper value + //string owner = null; + //string repo = null; + //long? userid = null; + //long? projectId = null; + //instance.RevokeLabelStudioUserAccess(owner, repo, userid, projectId); + + } + } + +} diff --git a/C#/src/dagshub_api.Test/Api/BranchesApiTests.cs b/C#/src/dagshub_api.Test/Api/BranchesApiTests.cs index 6c80b50..6921317 100644 --- a/C#/src/dagshub_api.Test/Api/BranchesApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/BranchesApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Api/CollaboratorsApiTests.cs b/C#/src/dagshub_api.Test/Api/CollaboratorsApiTests.cs index d13e93a..ed0fc26 100644 --- a/C#/src/dagshub_api.Test/Api/CollaboratorsApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/CollaboratorsApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Api/CommitsApiTests.cs b/C#/src/dagshub_api.Test/Api/CommitsApiTests.cs index 501f61f..04f301b 100644 --- a/C#/src/dagshub_api.Test/Api/CommitsApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/CommitsApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Api/ContentApiTests.cs b/C#/src/dagshub_api.Test/Api/ContentApiTests.cs index 832a3bc..9ca8e4e 100644 --- a/C#/src/dagshub_api.Test/Api/ContentApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/ContentApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Api/ExperimentsApiTests.cs b/C#/src/dagshub_api.Test/Api/ExperimentsApiTests.cs index 20ba102..96220cc 100644 --- a/C#/src/dagshub_api.Test/Api/ExperimentsApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/ExperimentsApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Api/IssuesApiTests.cs b/C#/src/dagshub_api.Test/Api/IssuesApiTests.cs index 29bbc70..0fca963 100644 --- a/C#/src/dagshub_api.Test/Api/IssuesApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/IssuesApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Api/OrganizationsApiTests.cs b/C#/src/dagshub_api.Test/Api/OrganizationsApiTests.cs new file mode 100644 index 0000000..d8266c9 --- /dev/null +++ b/C#/src/dagshub_api.Test/Api/OrganizationsApiTests.cs @@ -0,0 +1,79 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.IO; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Reflection; +using RestSharp; +using NUnit.Framework; + +using dagshub_api.Client; +using dagshub_api.Api; +using dagshub_api.Model; + +namespace dagshub_api.Test +{ + /// + /// Class for testing OrganizationsApi + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the API endpoint. + /// + [TestFixture] + public class OrganizationsApiTests + { + private OrganizationsApi instance; + + /// + /// Setup before each unit test + /// + [SetUp] + public void Init() + { + instance = new OrganizationsApi(); + } + + /// + /// Clean up after each unit test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of OrganizationsApi + /// + [Test] + public void InstanceTest() + { + // TODO uncomment below to test 'IsInstanceOfType' OrganizationsApi + //Assert.IsInstanceOfType(typeof(OrganizationsApi), instance, "instance is a OrganizationsApi"); + } + + /// + /// Test CreateOrgTeam + /// + [Test] + public void CreateOrgTeamTest() + { + // TODO uncomment below to test the method and replace null with proper value + //CreateAnnotatorTeam body = null; + //string orgname = null; + //instance.CreateOrgTeam(body, orgname); + + } + } + +} diff --git a/C#/src/dagshub_api.Test/Api/ReleasesApiTests.cs b/C#/src/dagshub_api.Test/Api/ReleasesApiTests.cs index 63165c9..1848d67 100644 --- a/C#/src/dagshub_api.Test/Api/ReleasesApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/ReleasesApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Api/RepositoryApiTests.cs b/C#/src/dagshub_api.Test/Api/RepositoryApiTests.cs index 54ebbe0..20ee373 100644 --- a/C#/src/dagshub_api.Test/Api/RepositoryApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/RepositoryApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Api/StorageIntegrationsApiTests.cs b/C#/src/dagshub_api.Test/Api/StorageIntegrationsApiTests.cs index 394e411..d04de28 100644 --- a/C#/src/dagshub_api.Test/Api/StorageIntegrationsApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/StorageIntegrationsApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -76,8 +76,9 @@ public void GetBucketContentTest() //string path = null; //bool? includeSize = null; //int? limit = null; + //bool? paging = null; //string fromToken = null; - //var response = instance.GetBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); + //var response = instance.GetBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken); //Assert.IsInstanceOf (response, "response is Files1"); } /// diff --git a/C#/src/dagshub_api.Test/Api/UserApiTests.cs b/C#/src/dagshub_api.Test/Api/UserApiTests.cs index af9454c..e5b902f 100644 --- a/C#/src/dagshub_api.Test/Api/UserApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/UserApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Api/WebhooksApiTests.cs b/C#/src/dagshub_api.Test/Api/WebhooksApiTests.cs index a7e83ed..73e51cc 100644 --- a/C#/src/dagshub_api.Test/Api/WebhooksApiTests.cs +++ b/C#/src/dagshub_api.Test/Api/WebhooksApiTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/CollaboratorsCollaboratorBodyTests.cs b/C#/src/dagshub_api.Test/Model/CollaboratorsCollaboratorBodyTests.cs index 52b7281..5827416 100644 --- a/C#/src/dagshub_api.Test/Model/CollaboratorsCollaboratorBodyTests.cs +++ b/C#/src/dagshub_api.Test/Model/CollaboratorsCollaboratorBodyTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/CreateAnnotatorTeamTests.cs b/C#/src/dagshub_api.Test/Model/CreateAnnotatorTeamTests.cs new file mode 100644 index 0000000..267c96c --- /dev/null +++ b/C#/src/dagshub_api.Test/Model/CreateAnnotatorTeamTests.cs @@ -0,0 +1,103 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using dagshub_api.Api; +using dagshub_api.Model; +using dagshub_api.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace dagshub_api.Test +{ + /// + /// Class for testing CreateAnnotatorTeam + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class CreateAnnotatorTeamTests + { + // TODO uncomment below to declare an instance variable for CreateAnnotatorTeam + //private CreateAnnotatorTeam instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of CreateAnnotatorTeam + //instance = new CreateAnnotatorTeam(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of CreateAnnotatorTeam + /// + [Test] + public void CreateAnnotatorTeamInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" CreateAnnotatorTeam + //Assert.IsInstanceOfType (instance, "variable 'instance' is a CreateAnnotatorTeam"); + } + + + /// + /// Test the property 'Name' + /// + [Test] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'Description' + /// + [Test] + public void DescriptionTest() + { + // TODO unit test for the property 'Description' + } + /// + /// Test the property 'TeamType' + /// + [Test] + public void TeamTypeTest() + { + // TODO unit test for the property 'TeamType' + } + /// + /// Test the property 'Permission' + /// + [Test] + public void PermissionTest() + { + // TODO unit test for the property 'Permission' + } + + } + +} diff --git a/C#/src/dagshub_api.Test/Model/CreateRepoTests.cs b/C#/src/dagshub_api.Test/Model/CreateRepoTests.cs index 6771ce1..d402519 100644 --- a/C#/src/dagshub_api.Test/Model/CreateRepoTests.cs +++ b/C#/src/dagshub_api.Test/Model/CreateRepoTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/EditExperimentPostTests.cs b/C#/src/dagshub_api.Test/Model/EditExperimentPostTests.cs index 8219782..124ad4e 100644 --- a/C#/src/dagshub_api.Test/Model/EditExperimentPostTests.cs +++ b/C#/src/dagshub_api.Test/Model/EditExperimentPostTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/ExperimentKeysTests.cs b/C#/src/dagshub_api.Test/Model/ExperimentKeysTests.cs index 66bc6e6..68adf7a 100644 --- a/C#/src/dagshub_api.Test/Model/ExperimentKeysTests.cs +++ b/C#/src/dagshub_api.Test/Model/ExperimentKeysTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/FileTests.cs b/C#/src/dagshub_api.Test/Model/FileTests.cs index 000e4d7..bae0529 100644 --- a/C#/src/dagshub_api.Test/Model/FileTests.cs +++ b/C#/src/dagshub_api.Test/Model/FileTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/Files1Tests.cs b/C#/src/dagshub_api.Test/Model/Files1Tests.cs index 447c5d4..f3df02f 100644 --- a/C#/src/dagshub_api.Test/Model/Files1Tests.cs +++ b/C#/src/dagshub_api.Test/Model/Files1Tests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -74,14 +74,6 @@ public void EntriesTest() // TODO unit test for the property 'Entries' } /// - /// Test the property 'Limit' - /// - [Test] - public void LimitTest() - { - // TODO unit test for the property 'Limit' - } - /// /// Test the property 'NextToken' /// [Test] diff --git a/C#/src/dagshub_api.Test/Model/FilesTests.cs b/C#/src/dagshub_api.Test/Model/FilesTests.cs index 6642f36..47b5e02 100644 --- a/C#/src/dagshub_api.Test/Model/FilesTests.cs +++ b/C#/src/dagshub_api.Test/Model/FilesTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/GrantLabelStudioAccessTests.cs b/C#/src/dagshub_api.Test/Model/GrantLabelStudioAccessTests.cs new file mode 100644 index 0000000..9c328b0 --- /dev/null +++ b/C#/src/dagshub_api.Test/Model/GrantLabelStudioAccessTests.cs @@ -0,0 +1,87 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using dagshub_api.Api; +using dagshub_api.Model; +using dagshub_api.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace dagshub_api.Test +{ + /// + /// Class for testing GrantLabelStudioAccess + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class GrantLabelStudioAccessTests + { + // TODO uncomment below to declare an instance variable for GrantLabelStudioAccess + //private GrantLabelStudioAccess instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of GrantLabelStudioAccess + //instance = new GrantLabelStudioAccess(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of GrantLabelStudioAccess + /// + [Test] + public void GrantLabelStudioAccessInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" GrantLabelStudioAccess + //Assert.IsInstanceOfType (instance, "variable 'instance' is a GrantLabelStudioAccess"); + } + + + /// + /// Test the property 'ProjectId' + /// + [Test] + public void ProjectIdTest() + { + // TODO unit test for the property 'ProjectId' + } + /// + /// Test the property 'AccessLevel' + /// + [Test] + public void AccessLevelTest() + { + // TODO unit test for the property 'AccessLevel' + } + + } + +} diff --git a/C#/src/dagshub_api.Test/Model/HooksIdBodyTests.cs b/C#/src/dagshub_api.Test/Model/HooksIdBodyTests.cs index f810f85..2f2b0ed 100644 --- a/C#/src/dagshub_api.Test/Model/HooksIdBodyTests.cs +++ b/C#/src/dagshub_api.Test/Model/HooksIdBodyTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/InlineResponse200Tests.cs b/C#/src/dagshub_api.Test/Model/InlineResponse200Tests.cs new file mode 100644 index 0000000..a1f3b11 --- /dev/null +++ b/C#/src/dagshub_api.Test/Model/InlineResponse200Tests.cs @@ -0,0 +1,95 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using dagshub_api.Api; +using dagshub_api.Model; +using dagshub_api.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace dagshub_api.Test +{ + /// + /// Class for testing InlineResponse200 + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class InlineResponse200Tests + { + // TODO uncomment below to declare an instance variable for InlineResponse200 + //private InlineResponse200 instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of InlineResponse200 + //instance = new InlineResponse200(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of InlineResponse200 + /// + [Test] + public void InlineResponse200InstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" InlineResponse200 + //Assert.IsInstanceOfType (instance, "variable 'instance' is a InlineResponse200"); + } + + + /// + /// Test the property 'UserId' + /// + [Test] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'ProjectId' + /// + [Test] + public void ProjectIdTest() + { + // TODO unit test for the property 'ProjectId' + } + /// + /// Test the property 'AccessLevel' + /// + [Test] + public void AccessLevelTest() + { + // TODO unit test for the property 'AccessLevel' + } + + } + +} diff --git a/C#/src/dagshub_api.Test/Model/IntegrationInnerTests.cs b/C#/src/dagshub_api.Test/Model/IntegrationInnerTests.cs index 896fa71..b4fdd28 100644 --- a/C#/src/dagshub_api.Test/Model/IntegrationInnerTests.cs +++ b/C#/src/dagshub_api.Test/Model/IntegrationInnerTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/IntegrationTests.cs b/C#/src/dagshub_api.Test/Model/IntegrationTests.cs index a98718e..d937c1c 100644 --- a/C#/src/dagshub_api.Test/Model/IntegrationTests.cs +++ b/C#/src/dagshub_api.Test/Model/IntegrationTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/IssueAssigneeTests.cs b/C#/src/dagshub_api.Test/Model/IssueAssigneeTests.cs index 93a41ca..c747071 100644 --- a/C#/src/dagshub_api.Test/Model/IssueAssigneeTests.cs +++ b/C#/src/dagshub_api.Test/Model/IssueAssigneeTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/IssueLabelsTests.cs b/C#/src/dagshub_api.Test/Model/IssueLabelsTests.cs index 890b5c9..ef79fe0 100644 --- a/C#/src/dagshub_api.Test/Model/IssueLabelsTests.cs +++ b/C#/src/dagshub_api.Test/Model/IssueLabelsTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/IssueMilestoneTests.cs b/C#/src/dagshub_api.Test/Model/IssueMilestoneTests.cs index 62889dc..8069d50 100644 --- a/C#/src/dagshub_api.Test/Model/IssueMilestoneTests.cs +++ b/C#/src/dagshub_api.Test/Model/IssueMilestoneTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/IssueTests.cs b/C#/src/dagshub_api.Test/Model/IssueTests.cs index df519c7..4729055 100644 --- a/C#/src/dagshub_api.Test/Model/IssueTests.cs +++ b/C#/src/dagshub_api.Test/Model/IssueTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/IssuesTests.cs b/C#/src/dagshub_api.Test/Model/IssuesTests.cs index e45c799..9eae746 100644 --- a/C#/src/dagshub_api.Test/Model/IssuesTests.cs +++ b/C#/src/dagshub_api.Test/Model/IssuesTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/LabelStudioProjectAccessTests.cs b/C#/src/dagshub_api.Test/Model/LabelStudioProjectAccessTests.cs new file mode 100644 index 0000000..f934bff --- /dev/null +++ b/C#/src/dagshub_api.Test/Model/LabelStudioProjectAccessTests.cs @@ -0,0 +1,135 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ + +using NUnit.Framework; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using dagshub_api.Api; +using dagshub_api.Model; +using dagshub_api.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace dagshub_api.Test +{ + /// + /// Class for testing LabelStudioProjectAccess + /// + /// + /// This file is automatically generated by Swagger Codegen. + /// Please update the test case below to test the model. + /// + [TestFixture] + public class LabelStudioProjectAccessTests + { + // TODO uncomment below to declare an instance variable for LabelStudioProjectAccess + //private LabelStudioProjectAccess instance; + + /// + /// Setup before each test + /// + [SetUp] + public void Init() + { + // TODO uncomment below to create an instance of LabelStudioProjectAccess + //instance = new LabelStudioProjectAccess(); + } + + /// + /// Clean up after each test + /// + [TearDown] + public void Cleanup() + { + + } + + /// + /// Test an instance of LabelStudioProjectAccess + /// + [Test] + public void LabelStudioProjectAccessInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" LabelStudioProjectAccess + //Assert.IsInstanceOfType (instance, "variable 'instance' is a LabelStudioProjectAccess"); + } + + + /// + /// Test the property 'Id' + /// + [Test] + public void IdTest() + { + // TODO unit test for the property 'Id' + } + /// + /// Test the property 'RepoId' + /// + [Test] + public void RepoIdTest() + { + // TODO unit test for the property 'RepoId' + } + /// + /// Test the property 'ProjectId' + /// + [Test] + public void ProjectIdTest() + { + // TODO unit test for the property 'ProjectId' + } + /// + /// Test the property 'UserId' + /// + [Test] + public void UserIdTest() + { + // TODO unit test for the property 'UserId' + } + /// + /// Test the property 'TeamId' + /// + [Test] + public void TeamIdTest() + { + // TODO unit test for the property 'TeamId' + } + /// + /// Test the property 'AccessLevel' + /// + [Test] + public void AccessLevelTest() + { + // TODO unit test for the property 'AccessLevel' + } + /// + /// Test the property 'CreatedUnix' + /// + [Test] + public void CreatedUnixTest() + { + // TODO unit test for the property 'CreatedUnix' + } + /// + /// Test the property 'User' + /// + [Test] + public void UserTest() + { + // TODO unit test for the property 'User' + } + + } + +} diff --git a/C#/src/dagshub_api.Test/Model/LabelsTests.cs b/C#/src/dagshub_api.Test/Model/LabelsTests.cs index 4a6da52..06c223b 100644 --- a/C#/src/dagshub_api.Test/Model/LabelsTests.cs +++ b/C#/src/dagshub_api.Test/Model/LabelsTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/MigrateRepoTests.cs b/C#/src/dagshub_api.Test/Model/MigrateRepoTests.cs index 2b3208b..59b0882 100644 --- a/C#/src/dagshub_api.Test/Model/MigrateRepoTests.cs +++ b/C#/src/dagshub_api.Test/Model/MigrateRepoTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/PatchIssueTests.cs b/C#/src/dagshub_api.Test/Model/PatchIssueTests.cs index 34d0762..4845467 100644 --- a/C#/src/dagshub_api.Test/Model/PatchIssueTests.cs +++ b/C#/src/dagshub_api.Test/Model/PatchIssueTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/PostIssueTests.cs b/C#/src/dagshub_api.Test/Model/PostIssueTests.cs index dc2c8b7..cef0e10 100644 --- a/C#/src/dagshub_api.Test/Model/PostIssueTests.cs +++ b/C#/src/dagshub_api.Test/Model/PostIssueTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/PutFileTests.cs b/C#/src/dagshub_api.Test/Model/PutFileTests.cs index 892d8eb..9bd733e 100644 --- a/C#/src/dagshub_api.Test/Model/PutFileTests.cs +++ b/C#/src/dagshub_api.Test/Model/PutFileTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/RepoHooksBodyTests.cs b/C#/src/dagshub_api.Test/Model/RepoHooksBodyTests.cs index 70cc2be..24d6363 100644 --- a/C#/src/dagshub_api.Test/Model/RepoHooksBodyTests.cs +++ b/C#/src/dagshub_api.Test/Model/RepoHooksBodyTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/StateTests.cs b/C#/src/dagshub_api.Test/Model/StateTests.cs index 8e4c0a3..9fdf326 100644 --- a/C#/src/dagshub_api.Test/Model/StateTests.cs +++ b/C#/src/dagshub_api.Test/Model/StateTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/UserTests.cs b/C#/src/dagshub_api.Test/Model/UserTests.cs index 4b6053c..156e982 100644 --- a/C#/src/dagshub_api.Test/Model/UserTests.cs +++ b/C#/src/dagshub_api.Test/Model/UserTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/WebhookConfigTests.cs b/C#/src/dagshub_api.Test/Model/WebhookConfigTests.cs index abd5658..9ed8162 100644 --- a/C#/src/dagshub_api.Test/Model/WebhookConfigTests.cs +++ b/C#/src/dagshub_api.Test/Model/WebhookConfigTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/Model/WebhookEventsTests.cs b/C#/src/dagshub_api.Test/Model/WebhookEventsTests.cs index e36b67a..8d46fed 100644 --- a/C#/src/dagshub_api.Test/Model/WebhookEventsTests.cs +++ b/C#/src/dagshub_api.Test/Model/WebhookEventsTests.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api.Test/dagshub_api.Test.csproj b/C#/src/dagshub_api.Test/dagshub_api.Test.csproj index 9aae521..32967d6 100644 --- a/C#/src/dagshub_api.Test/dagshub_api.Test.csproj +++ b/C#/src/dagshub_api.Test/dagshub_api.Test.csproj @@ -4,7 +4,7 @@ DagsHub API This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -OpenAPI spec version: 1.0.2 +OpenAPI spec version: 1.0.3 --> @@ -81,7 +81,7 @@ OpenAPI spec version: 1.0.2 - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698} + {DC4E8379-1DB2-416F-B33C-82A82758E481} dagshub_api diff --git a/C#/src/dagshub_api/Api/AnnotationsApi.cs b/C#/src/dagshub_api/Api/AnnotationsApi.cs new file mode 100644 index 0000000..e1da61a --- /dev/null +++ b/C#/src/dagshub_api/Api/AnnotationsApi.cs @@ -0,0 +1,2032 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace dagshub_api.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IAnnotationsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Get team access level for annotation projects + /// + /// + /// Get the access level for a specific team and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// LabelStudioProjectAccess + LabelStudioProjectAccess GetLabelStudioTeamAccess (string owner, string repo, long? teamid, long? projectId = null); + + /// + /// Get team access level for annotation projects + /// + /// + /// Get the access level for a specific team and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of LabelStudioProjectAccess + ApiResponse GetLabelStudioTeamAccessWithHttpInfo (string owner, string repo, long? teamid, long? projectId = null); + /// + /// Get user access level for annotation projects + /// + /// + /// Get the access level for a specific user and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// InlineResponse200 + InlineResponse200 GetLabelStudioUserAccess (string owner, string repo, long? userid, long? projectId = null); + + /// + /// Get user access level for annotation projects + /// + /// + /// Get the access level for a specific user and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of InlineResponse200 + ApiResponse GetLabelStudioUserAccessWithHttpInfo (string owner, string repo, long? userid, long? projectId = null); + /// + /// Grant team access to annotation projects + /// + /// + /// Grant a team access to specific Label Studio annotation projects (organization repositories only) + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// Team ID + /// + void GrantLabelStudioTeamAccess (GrantLabelStudioAccess body, string owner, string repo, long? teamid); + + /// + /// Grant team access to annotation projects + /// + /// + /// Grant a team access to specific Label Studio annotation projects (organization repositories only) + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// Team ID + /// ApiResponse of Object(void) + ApiResponse GrantLabelStudioTeamAccessWithHttpInfo (GrantLabelStudioAccess body, string owner, string repo, long? teamid); + /// + /// Grant user access to annotation projects + /// + /// + /// Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// User ID + /// + void GrantLabelStudioUserAccess (GrantLabelStudioAccess body, string owner, string repo, long? userid); + + /// + /// Grant user access to annotation projects + /// + /// + /// Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// User ID + /// ApiResponse of Object(void) + ApiResponse GrantLabelStudioUserAccessWithHttpInfo (GrantLabelStudioAccess body, string owner, string repo, long? userid); + /// + /// List team access entries for annotation projects + /// + /// + /// Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// List<LabelStudioProjectAccess> + List ListLabelStudioTeamAccess (string owner, string repo, long? projectId = null); + + /// + /// List team access entries for annotation projects + /// + /// + /// Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of List<LabelStudioProjectAccess> + ApiResponse> ListLabelStudioTeamAccessWithHttpInfo (string owner, string repo, long? projectId = null); + /// + /// List user access entries for annotation projects + /// + /// + /// Get a list of users with access to Label Studio annotation projects in the repository + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// List<LabelStudioProjectAccess> + List ListLabelStudioUserAccess (string owner, string repo, long? projectId = null); + + /// + /// List user access entries for annotation projects + /// + /// + /// Get a list of users with access to Label Studio annotation projects in the repository + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of List<LabelStudioProjectAccess> + ApiResponse> ListLabelStudioUserAccessWithHttpInfo (string owner, string repo, long? projectId = null); + /// + /// Revoke team access to annotation projects + /// + /// + /// Revoke a team's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// + void RevokeLabelStudioTeamAccess (string owner, string repo, long? teamid, long? projectId = null); + + /// + /// Revoke team access to annotation projects + /// + /// + /// Revoke a team's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of Object(void) + ApiResponse RevokeLabelStudioTeamAccessWithHttpInfo (string owner, string repo, long? teamid, long? projectId = null); + /// + /// Revoke user access to annotation projects + /// + /// + /// Revoke a user's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// + void RevokeLabelStudioUserAccess (string owner, string repo, long? userid, long? projectId = null); + + /// + /// Revoke user access to annotation projects + /// + /// + /// Revoke a user's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of Object(void) + ApiResponse RevokeLabelStudioUserAccessWithHttpInfo (string owner, string repo, long? userid, long? projectId = null); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Get team access level for annotation projects + /// + /// + /// Get the access level for a specific team and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of LabelStudioProjectAccess + System.Threading.Tasks.Task GetLabelStudioTeamAccessAsync (string owner, string repo, long? teamid, long? projectId = null); + + /// + /// Get team access level for annotation projects + /// + /// + /// Get the access level for a specific team and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse (LabelStudioProjectAccess) + System.Threading.Tasks.Task> GetLabelStudioTeamAccessAsyncWithHttpInfo (string owner, string repo, long? teamid, long? projectId = null); + /// + /// Get user access level for annotation projects + /// + /// + /// Get the access level for a specific user and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of InlineResponse200 + System.Threading.Tasks.Task GetLabelStudioUserAccessAsync (string owner, string repo, long? userid, long? projectId = null); + + /// + /// Get user access level for annotation projects + /// + /// + /// Get the access level for a specific user and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse (InlineResponse200) + System.Threading.Tasks.Task> GetLabelStudioUserAccessAsyncWithHttpInfo (string owner, string repo, long? userid, long? projectId = null); + /// + /// Grant team access to annotation projects + /// + /// + /// Grant a team access to specific Label Studio annotation projects (organization repositories only) + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// Team ID + /// Task of void + System.Threading.Tasks.Task GrantLabelStudioTeamAccessAsync (GrantLabelStudioAccess body, string owner, string repo, long? teamid); + + /// + /// Grant team access to annotation projects + /// + /// + /// Grant a team access to specific Label Studio annotation projects (organization repositories only) + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// Team ID + /// Task of ApiResponse + System.Threading.Tasks.Task> GrantLabelStudioTeamAccessAsyncWithHttpInfo (GrantLabelStudioAccess body, string owner, string repo, long? teamid); + /// + /// Grant user access to annotation projects + /// + /// + /// Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// User ID + /// Task of void + System.Threading.Tasks.Task GrantLabelStudioUserAccessAsync (GrantLabelStudioAccess body, string owner, string repo, long? userid); + + /// + /// Grant user access to annotation projects + /// + /// + /// Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// User ID + /// Task of ApiResponse + System.Threading.Tasks.Task> GrantLabelStudioUserAccessAsyncWithHttpInfo (GrantLabelStudioAccess body, string owner, string repo, long? userid); + /// + /// List team access entries for annotation projects + /// + /// + /// Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of List<LabelStudioProjectAccess> + System.Threading.Tasks.Task> ListLabelStudioTeamAccessAsync (string owner, string repo, long? projectId = null); + + /// + /// List team access entries for annotation projects + /// + /// + /// Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse (List<LabelStudioProjectAccess>) + System.Threading.Tasks.Task>> ListLabelStudioTeamAccessAsyncWithHttpInfo (string owner, string repo, long? projectId = null); + /// + /// List user access entries for annotation projects + /// + /// + /// Get a list of users with access to Label Studio annotation projects in the repository + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of List<LabelStudioProjectAccess> + System.Threading.Tasks.Task> ListLabelStudioUserAccessAsync (string owner, string repo, long? projectId = null); + + /// + /// List user access entries for annotation projects + /// + /// + /// Get a list of users with access to Label Studio annotation projects in the repository + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse (List<LabelStudioProjectAccess>) + System.Threading.Tasks.Task>> ListLabelStudioUserAccessAsyncWithHttpInfo (string owner, string repo, long? projectId = null); + /// + /// Revoke team access to annotation projects + /// + /// + /// Revoke a team's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of void + System.Threading.Tasks.Task RevokeLabelStudioTeamAccessAsync (string owner, string repo, long? teamid, long? projectId = null); + + /// + /// Revoke team access to annotation projects + /// + /// + /// Revoke a team's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> RevokeLabelStudioTeamAccessAsyncWithHttpInfo (string owner, string repo, long? teamid, long? projectId = null); + /// + /// Revoke user access to annotation projects + /// + /// + /// Revoke a user's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of void + System.Threading.Tasks.Task RevokeLabelStudioUserAccessAsync (string owner, string repo, long? userid, long? projectId = null); + + /// + /// Revoke user access to annotation projects + /// + /// + /// Revoke a user's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse + System.Threading.Tasks.Task> RevokeLabelStudioUserAccessAsyncWithHttpInfo (string owner, string repo, long? userid, long? projectId = null); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class AnnotationsApi : IAnnotationsApi + { + private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public AnnotationsApi(String basePath) + { + this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public AnnotationsApi() + { + this.Configuration = dagshub_api.Client.Configuration.Default; + + ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public AnnotationsApi(dagshub_api.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = dagshub_api.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public dagshub_api.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public dagshub_api.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Get team access level for annotation projects Get the access level for a specific team and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// LabelStudioProjectAccess + public LabelStudioProjectAccess GetLabelStudioTeamAccess (string owner, string repo, long? teamid, long? projectId = null) + { + ApiResponse localVarResponse = GetLabelStudioTeamAccessWithHttpInfo(owner, repo, teamid, projectId); + return localVarResponse.Data; + } + + /// + /// Get team access level for annotation projects Get the access level for a specific team and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of LabelStudioProjectAccess + public ApiResponse< LabelStudioProjectAccess > GetLabelStudioTeamAccessWithHttpInfo (string owner, string repo, long? teamid, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->GetLabelStudioTeamAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->GetLabelStudioTeamAccess"); + // verify the required parameter 'teamid' is set + if (teamid == null) + throw new ApiException(400, "Missing required parameter 'teamid' when calling AnnotationsApi->GetLabelStudioTeamAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (teamid != null) localVarPathParams.Add("teamid", this.Configuration.ApiClient.ParameterToString(teamid)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetLabelStudioTeamAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (LabelStudioProjectAccess) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelStudioProjectAccess))); + } + + /// + /// Get team access level for annotation projects Get the access level for a specific team and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of LabelStudioProjectAccess + public async System.Threading.Tasks.Task GetLabelStudioTeamAccessAsync (string owner, string repo, long? teamid, long? projectId = null) + { + ApiResponse localVarResponse = await GetLabelStudioTeamAccessAsyncWithHttpInfo(owner, repo, teamid, projectId); + return localVarResponse.Data; + + } + + /// + /// Get team access level for annotation projects Get the access level for a specific team and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse (LabelStudioProjectAccess) + public async System.Threading.Tasks.Task> GetLabelStudioTeamAccessAsyncWithHttpInfo (string owner, string repo, long? teamid, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->GetLabelStudioTeamAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->GetLabelStudioTeamAccess"); + // verify the required parameter 'teamid' is set + if (teamid == null) + throw new ApiException(400, "Missing required parameter 'teamid' when calling AnnotationsApi->GetLabelStudioTeamAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (teamid != null) localVarPathParams.Add("teamid", this.Configuration.ApiClient.ParameterToString(teamid)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetLabelStudioTeamAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (LabelStudioProjectAccess) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(LabelStudioProjectAccess))); + } + + /// + /// Get user access level for annotation projects Get the access level for a specific user and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// InlineResponse200 + public InlineResponse200 GetLabelStudioUserAccess (string owner, string repo, long? userid, long? projectId = null) + { + ApiResponse localVarResponse = GetLabelStudioUserAccessWithHttpInfo(owner, repo, userid, projectId); + return localVarResponse.Data; + } + + /// + /// Get user access level for annotation projects Get the access level for a specific user and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of InlineResponse200 + public ApiResponse< InlineResponse200 > GetLabelStudioUserAccessWithHttpInfo (string owner, string repo, long? userid, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->GetLabelStudioUserAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->GetLabelStudioUserAccess"); + // verify the required parameter 'userid' is set + if (userid == null) + throw new ApiException(400, "Missing required parameter 'userid' when calling AnnotationsApi->GetLabelStudioUserAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/users/{userid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (userid != null) localVarPathParams.Add("userid", this.Configuration.ApiClient.ParameterToString(userid)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetLabelStudioUserAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (InlineResponse200) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200))); + } + + /// + /// Get user access level for annotation projects Get the access level for a specific user and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of InlineResponse200 + public async System.Threading.Tasks.Task GetLabelStudioUserAccessAsync (string owner, string repo, long? userid, long? projectId = null) + { + ApiResponse localVarResponse = await GetLabelStudioUserAccessAsyncWithHttpInfo(owner, repo, userid, projectId); + return localVarResponse.Data; + + } + + /// + /// Get user access level for annotation projects Get the access level for a specific user and project (or all projects) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse (InlineResponse200) + public async System.Threading.Tasks.Task> GetLabelStudioUserAccessAsyncWithHttpInfo (string owner, string repo, long? userid, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->GetLabelStudioUserAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->GetLabelStudioUserAccess"); + // verify the required parameter 'userid' is set + if (userid == null) + throw new ApiException(400, "Missing required parameter 'userid' when calling AnnotationsApi->GetLabelStudioUserAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/users/{userid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (userid != null) localVarPathParams.Add("userid", this.Configuration.ApiClient.ParameterToString(userid)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GetLabelStudioUserAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (InlineResponse200) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponse200))); + } + + /// + /// Grant team access to annotation projects Grant a team access to specific Label Studio annotation projects (organization repositories only) + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// Team ID + /// + public void GrantLabelStudioTeamAccess (GrantLabelStudioAccess body, string owner, string repo, long? teamid) + { + GrantLabelStudioTeamAccessWithHttpInfo(body, owner, repo, teamid); + } + + /// + /// Grant team access to annotation projects Grant a team access to specific Label Studio annotation projects (organization repositories only) + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// Team ID + /// ApiResponse of Object(void) + public ApiResponse GrantLabelStudioTeamAccessWithHttpInfo (GrantLabelStudioAccess body, string owner, string repo, long? teamid) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling AnnotationsApi->GrantLabelStudioTeamAccess"); + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->GrantLabelStudioTeamAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->GrantLabelStudioTeamAccess"); + // verify the required parameter 'teamid' is set + if (teamid == null) + throw new ApiException(400, "Missing required parameter 'teamid' when calling AnnotationsApi->GrantLabelStudioTeamAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (teamid != null) localVarPathParams.Add("teamid", this.Configuration.ApiClient.ParameterToString(teamid)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GrantLabelStudioTeamAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Grant team access to annotation projects Grant a team access to specific Label Studio annotation projects (organization repositories only) + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// Team ID + /// Task of void + public async System.Threading.Tasks.Task GrantLabelStudioTeamAccessAsync (GrantLabelStudioAccess body, string owner, string repo, long? teamid) + { + await GrantLabelStudioTeamAccessAsyncWithHttpInfo(body, owner, repo, teamid); + + } + + /// + /// Grant team access to annotation projects Grant a team access to specific Label Studio annotation projects (organization repositories only) + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// Team ID + /// Task of ApiResponse + public async System.Threading.Tasks.Task> GrantLabelStudioTeamAccessAsyncWithHttpInfo (GrantLabelStudioAccess body, string owner, string repo, long? teamid) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling AnnotationsApi->GrantLabelStudioTeamAccess"); + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->GrantLabelStudioTeamAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->GrantLabelStudioTeamAccess"); + // verify the required parameter 'teamid' is set + if (teamid == null) + throw new ApiException(400, "Missing required parameter 'teamid' when calling AnnotationsApi->GrantLabelStudioTeamAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (teamid != null) localVarPathParams.Add("teamid", this.Configuration.ApiClient.ParameterToString(teamid)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GrantLabelStudioTeamAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Grant user access to annotation projects Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// User ID + /// + public void GrantLabelStudioUserAccess (GrantLabelStudioAccess body, string owner, string repo, long? userid) + { + GrantLabelStudioUserAccessWithHttpInfo(body, owner, repo, userid); + } + + /// + /// Grant user access to annotation projects Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// User ID + /// ApiResponse of Object(void) + public ApiResponse GrantLabelStudioUserAccessWithHttpInfo (GrantLabelStudioAccess body, string owner, string repo, long? userid) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling AnnotationsApi->GrantLabelStudioUserAccess"); + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->GrantLabelStudioUserAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->GrantLabelStudioUserAccess"); + // verify the required parameter 'userid' is set + if (userid == null) + throw new ApiException(400, "Missing required parameter 'userid' when calling AnnotationsApi->GrantLabelStudioUserAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/users/{userid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (userid != null) localVarPathParams.Add("userid", this.Configuration.ApiClient.ParameterToString(userid)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GrantLabelStudioUserAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Grant user access to annotation projects Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// User ID + /// Task of void + public async System.Threading.Tasks.Task GrantLabelStudioUserAccessAsync (GrantLabelStudioAccess body, string owner, string repo, long? userid) + { + await GrantLabelStudioUserAccessAsyncWithHttpInfo(body, owner, repo, userid); + + } + + /// + /// Grant user access to annotation projects Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + /// + /// Thrown when fails to make API call + /// + /// owner of the repository + /// name of the repository + /// User ID + /// Task of ApiResponse + public async System.Threading.Tasks.Task> GrantLabelStudioUserAccessAsyncWithHttpInfo (GrantLabelStudioAccess body, string owner, string repo, long? userid) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling AnnotationsApi->GrantLabelStudioUserAccess"); + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->GrantLabelStudioUserAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->GrantLabelStudioUserAccess"); + // verify the required parameter 'userid' is set + if (userid == null) + throw new ApiException(400, "Missing required parameter 'userid' when calling AnnotationsApi->GrantLabelStudioUserAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/users/{userid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (userid != null) localVarPathParams.Add("userid", this.Configuration.ApiClient.ParameterToString(userid)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("GrantLabelStudioUserAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// List team access entries for annotation projects Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// List<LabelStudioProjectAccess> + public List ListLabelStudioTeamAccess (string owner, string repo, long? projectId = null) + { + ApiResponse> localVarResponse = ListLabelStudioTeamAccessWithHttpInfo(owner, repo, projectId); + return localVarResponse.Data; + } + + /// + /// List team access entries for annotation projects Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of List<LabelStudioProjectAccess> + public ApiResponse< List > ListLabelStudioTeamAccessWithHttpInfo (string owner, string repo, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->ListLabelStudioTeamAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->ListLabelStudioTeamAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/teams"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ListLabelStudioTeamAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// List team access entries for annotation projects Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of List<LabelStudioProjectAccess> + public async System.Threading.Tasks.Task> ListLabelStudioTeamAccessAsync (string owner, string repo, long? projectId = null) + { + ApiResponse> localVarResponse = await ListLabelStudioTeamAccessAsyncWithHttpInfo(owner, repo, projectId); + return localVarResponse.Data; + + } + + /// + /// List team access entries for annotation projects Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse (List<LabelStudioProjectAccess>) + public async System.Threading.Tasks.Task>> ListLabelStudioTeamAccessAsyncWithHttpInfo (string owner, string repo, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->ListLabelStudioTeamAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->ListLabelStudioTeamAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/teams"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ListLabelStudioTeamAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// List user access entries for annotation projects Get a list of users with access to Label Studio annotation projects in the repository + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// List<LabelStudioProjectAccess> + public List ListLabelStudioUserAccess (string owner, string repo, long? projectId = null) + { + ApiResponse> localVarResponse = ListLabelStudioUserAccessWithHttpInfo(owner, repo, projectId); + return localVarResponse.Data; + } + + /// + /// List user access entries for annotation projects Get a list of users with access to Label Studio annotation projects in the repository + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of List<LabelStudioProjectAccess> + public ApiResponse< List > ListLabelStudioUserAccessWithHttpInfo (string owner, string repo, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->ListLabelStudioUserAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->ListLabelStudioUserAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/users"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ListLabelStudioUserAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// List user access entries for annotation projects Get a list of users with access to Label Studio annotation projects in the repository + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of List<LabelStudioProjectAccess> + public async System.Threading.Tasks.Task> ListLabelStudioUserAccessAsync (string owner, string repo, long? projectId = null) + { + ApiResponse> localVarResponse = await ListLabelStudioUserAccessAsyncWithHttpInfo(owner, repo, projectId); + return localVarResponse.Data; + + } + + /// + /// List user access entries for annotation projects Get a list of users with access to Label Studio annotation projects in the repository + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse (List<LabelStudioProjectAccess>) + public async System.Threading.Tasks.Task>> ListLabelStudioUserAccessAsyncWithHttpInfo (string owner, string repo, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->ListLabelStudioUserAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->ListLabelStudioUserAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/users"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + "application/json" + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("ListLabelStudioUserAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse>(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); + } + + /// + /// Revoke team access to annotation projects Revoke a team's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// + public void RevokeLabelStudioTeamAccess (string owner, string repo, long? teamid, long? projectId = null) + { + RevokeLabelStudioTeamAccessWithHttpInfo(owner, repo, teamid, projectId); + } + + /// + /// Revoke team access to annotation projects Revoke a team's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of Object(void) + public ApiResponse RevokeLabelStudioTeamAccessWithHttpInfo (string owner, string repo, long? teamid, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->RevokeLabelStudioTeamAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->RevokeLabelStudioTeamAccess"); + // verify the required parameter 'teamid' is set + if (teamid == null) + throw new ApiException(400, "Missing required parameter 'teamid' when calling AnnotationsApi->RevokeLabelStudioTeamAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (teamid != null) localVarPathParams.Add("teamid", this.Configuration.ApiClient.ParameterToString(teamid)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RevokeLabelStudioTeamAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Revoke team access to annotation projects Revoke a team's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of void + public async System.Threading.Tasks.Task RevokeLabelStudioTeamAccessAsync (string owner, string repo, long? teamid, long? projectId = null) + { + await RevokeLabelStudioTeamAccessAsyncWithHttpInfo(owner, repo, teamid, projectId); + + } + + /// + /// Revoke team access to annotation projects Revoke a team's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// Team ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RevokeLabelStudioTeamAccessAsyncWithHttpInfo (string owner, string repo, long? teamid, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->RevokeLabelStudioTeamAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->RevokeLabelStudioTeamAccess"); + // verify the required parameter 'teamid' is set + if (teamid == null) + throw new ApiException(400, "Missing required parameter 'teamid' when calling AnnotationsApi->RevokeLabelStudioTeamAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (teamid != null) localVarPathParams.Add("teamid", this.Configuration.ApiClient.ParameterToString(teamid)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RevokeLabelStudioTeamAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Revoke user access to annotation projects Revoke a user's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// + public void RevokeLabelStudioUserAccess (string owner, string repo, long? userid, long? projectId = null) + { + RevokeLabelStudioUserAccessWithHttpInfo(owner, repo, userid, projectId); + } + + /// + /// Revoke user access to annotation projects Revoke a user's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// ApiResponse of Object(void) + public ApiResponse RevokeLabelStudioUserAccessWithHttpInfo (string owner, string repo, long? userid, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->RevokeLabelStudioUserAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->RevokeLabelStudioUserAccess"); + // verify the required parameter 'userid' is set + if (userid == null) + throw new ApiException(400, "Missing required parameter 'userid' when calling AnnotationsApi->RevokeLabelStudioUserAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/users/{userid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (userid != null) localVarPathParams.Add("userid", this.Configuration.ApiClient.ParameterToString(userid)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RevokeLabelStudioUserAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Revoke user access to annotation projects Revoke a user's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of void + public async System.Threading.Tasks.Task RevokeLabelStudioUserAccessAsync (string owner, string repo, long? userid, long? projectId = null) + { + await RevokeLabelStudioUserAccessAsyncWithHttpInfo(owner, repo, userid, projectId); + + } + + /// + /// Revoke user access to annotation projects Revoke a user's access to Label Studio annotation projects + /// + /// Thrown when fails to make API call + /// owner of the repository + /// name of the repository + /// User ID + /// Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> RevokeLabelStudioUserAccessAsyncWithHttpInfo (string owner, string repo, long? userid, long? projectId = null) + { + // verify the required parameter 'owner' is set + if (owner == null) + throw new ApiException(400, "Missing required parameter 'owner' when calling AnnotationsApi->RevokeLabelStudioUserAccess"); + // verify the required parameter 'repo' is set + if (repo == null) + throw new ApiException(400, "Missing required parameter 'repo' when calling AnnotationsApi->RevokeLabelStudioUserAccess"); + // verify the required parameter 'userid' is set + if (userid == null) + throw new ApiException(400, "Missing required parameter 'userid' when calling AnnotationsApi->RevokeLabelStudioUserAccess"); + + var localVarPath = "/repos/{owner}/{repo}/annotations/access/users/{userid}"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (owner != null) localVarPathParams.Add("owner", this.Configuration.ApiClient.ParameterToString(owner)); // path parameter + if (repo != null) localVarPathParams.Add("repo", this.Configuration.ApiClient.ParameterToString(repo)); // path parameter + if (userid != null) localVarPathParams.Add("userid", this.Configuration.ApiClient.ParameterToString(userid)); // path parameter + if (projectId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "project_id", projectId)); // query parameter + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("RevokeLabelStudioUserAccess", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + } +} diff --git a/C#/src/dagshub_api/Api/BranchesApi.cs b/C#/src/dagshub_api/Api/BranchesApi.cs index 8653703..0664cb5 100644 --- a/C#/src/dagshub_api/Api/BranchesApi.cs +++ b/C#/src/dagshub_api/Api/BranchesApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Api/CollaboratorsApi.cs b/C#/src/dagshub_api/Api/CollaboratorsApi.cs index b088cbd..453a592 100644 --- a/C#/src/dagshub_api/Api/CollaboratorsApi.cs +++ b/C#/src/dagshub_api/Api/CollaboratorsApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Api/CommitsApi.cs b/C#/src/dagshub_api/Api/CommitsApi.cs index 72582fd..e44e47a 100644 --- a/C#/src/dagshub_api/Api/CommitsApi.cs +++ b/C#/src/dagshub_api/Api/CommitsApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Api/ContentApi.cs b/C#/src/dagshub_api/Api/ContentApi.cs index 749e23c..185bb81 100644 --- a/C#/src/dagshub_api/Api/ContentApi.cs +++ b/C#/src/dagshub_api/Api/ContentApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Api/ExperimentsApi.cs b/C#/src/dagshub_api/Api/ExperimentsApi.cs index 2ca37d2..6085212 100644 --- a/C#/src/dagshub_api/Api/ExperimentsApi.cs +++ b/C#/src/dagshub_api/Api/ExperimentsApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Api/IssuesApi.cs b/C#/src/dagshub_api/Api/IssuesApi.cs index 94af158..e8c8d3c 100644 --- a/C#/src/dagshub_api/Api/IssuesApi.cs +++ b/C#/src/dagshub_api/Api/IssuesApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Api/OrganizationsApi.cs b/C#/src/dagshub_api/Api/OrganizationsApi.cs new file mode 100644 index 0000000..59c9b95 --- /dev/null +++ b/C#/src/dagshub_api/Api/OrganizationsApi.cs @@ -0,0 +1,363 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using RestSharp; +using dagshub_api.Client; +using dagshub_api.Model; + +namespace dagshub_api.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOrganizationsApi : IApiAccessor + { + #region Synchronous Operations + /// + /// Create an organization team + /// + /// + /// Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + /// + /// Thrown when fails to make API call + /// + /// A DagsHub organization name + /// + void CreateOrgTeam (CreateAnnotatorTeam body, string orgname); + + /// + /// Create an organization team + /// + /// + /// Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + /// + /// Thrown when fails to make API call + /// + /// A DagsHub organization name + /// ApiResponse of Object(void) + ApiResponse CreateOrgTeamWithHttpInfo (CreateAnnotatorTeam body, string orgname); + #endregion Synchronous Operations + #region Asynchronous Operations + /// + /// Create an organization team + /// + /// + /// Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + /// + /// Thrown when fails to make API call + /// + /// A DagsHub organization name + /// Task of void + System.Threading.Tasks.Task CreateOrgTeamAsync (CreateAnnotatorTeam body, string orgname); + + /// + /// Create an organization team + /// + /// + /// Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + /// + /// Thrown when fails to make API call + /// + /// A DagsHub organization name + /// Task of ApiResponse + System.Threading.Tasks.Task> CreateOrgTeamAsyncWithHttpInfo (CreateAnnotatorTeam body, string orgname); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class OrganizationsApi : IOrganizationsApi + { + private dagshub_api.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// Initializes a new instance of the class. + /// + /// + public OrganizationsApi(String basePath) + { + this.Configuration = new dagshub_api.Client.Configuration { BasePath = basePath }; + + ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// + /// + public OrganizationsApi() + { + this.Configuration = dagshub_api.Client.Configuration.Default; + + ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public OrganizationsApi(dagshub_api.Client.Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = dagshub_api.Client.Configuration.Default; + else + this.Configuration = configuration; + + ExceptionFactory = dagshub_api.Client.Configuration.DefaultExceptionFactory; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public dagshub_api.Client.Configuration Configuration {get; set;} + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + public dagshub_api.Client.ExceptionFactory ExceptionFactory + { + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } + } + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public IDictionary DefaultHeader() + { + return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + /// + /// Create an organization team Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + /// + /// Thrown when fails to make API call + /// + /// A DagsHub organization name + /// + public void CreateOrgTeam (CreateAnnotatorTeam body, string orgname) + { + CreateOrgTeamWithHttpInfo(body, orgname); + } + + /// + /// Create an organization team Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + /// + /// Thrown when fails to make API call + /// + /// A DagsHub organization name + /// ApiResponse of Object(void) + public ApiResponse CreateOrgTeamWithHttpInfo (CreateAnnotatorTeam body, string orgname) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling OrganizationsApi->CreateOrgTeam"); + // verify the required parameter 'orgname' is set + if (orgname == null) + throw new ApiException(400, "Missing required parameter 'orgname' when calling OrganizationsApi->CreateOrgTeam"); + + var localVarPath = "/admin/orgs/{orgname}/teams"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (orgname != null) localVarPathParams.Add("orgname", this.Configuration.ApiClient.ParameterToString(orgname)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateOrgTeam", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + /// + /// Create an organization team Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + /// + /// Thrown when fails to make API call + /// + /// A DagsHub organization name + /// Task of void + public async System.Threading.Tasks.Task CreateOrgTeamAsync (CreateAnnotatorTeam body, string orgname) + { + await CreateOrgTeamAsyncWithHttpInfo(body, orgname); + + } + + /// + /// Create an organization team Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + /// + /// Thrown when fails to make API call + /// + /// A DagsHub organization name + /// Task of ApiResponse + public async System.Threading.Tasks.Task> CreateOrgTeamAsyncWithHttpInfo (CreateAnnotatorTeam body, string orgname) + { + // verify the required parameter 'body' is set + if (body == null) + throw new ApiException(400, "Missing required parameter 'body' when calling OrganizationsApi->CreateOrgTeam"); + // verify the required parameter 'orgname' is set + if (orgname == null) + throw new ApiException(400, "Missing required parameter 'orgname' when calling OrganizationsApi->CreateOrgTeam"); + + var localVarPath = "/admin/orgs/{orgname}/teams"; + var localVarPathParams = new Dictionary(); + var localVarQueryParams = new List>(); + var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); + var localVarFormParams = new Dictionary(); + var localVarFileParams = new Dictionary(); + Object localVarPostBody = null; + + // to determine the Content-Type header + String[] localVarHttpContentTypes = new String[] { + "application/json" + }; + String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); + + // to determine the Accept header + String[] localVarHttpHeaderAccepts = new String[] { + }; + String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); + if (localVarHttpHeaderAccept != null) + localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); + + if (orgname != null) localVarPathParams.Add("orgname", this.Configuration.ApiClient.ParameterToString(orgname)); // path parameter + if (body != null && body.GetType() != typeof(byte[])) + { + localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter + } + else + { + localVarPostBody = body; // byte array + } + // authentication (basicAuth) required + // http basic authentication required + if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) + { + localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); + } + // authentication (tokenAuth) required + if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("token"))) + { + localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "token", this.Configuration.GetApiKeyWithPrefix("token"))); + } + + // make the HTTP request + IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, + Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, + localVarPathParams, localVarHttpContentType); + + int localVarStatusCode = (int) localVarResponse.StatusCode; + + if (ExceptionFactory != null) + { + Exception exception = ExceptionFactory("CreateOrgTeam", localVarResponse); + if (exception != null) throw exception; + } + + return new ApiResponse(localVarStatusCode, + localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), + null); + } + + } +} diff --git a/C#/src/dagshub_api/Api/ReleasesApi.cs b/C#/src/dagshub_api/Api/ReleasesApi.cs index 263efe4..4a8a304 100644 --- a/C#/src/dagshub_api/Api/ReleasesApi.cs +++ b/C#/src/dagshub_api/Api/ReleasesApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Api/RepositoryApi.cs b/C#/src/dagshub_api/Api/RepositoryApi.cs index d3ae0ca..c21a7d9 100644 --- a/C#/src/dagshub_api/Api/RepositoryApi.cs +++ b/C#/src/dagshub_api/Api/RepositoryApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Api/StorageIntegrationsApi.cs b/C#/src/dagshub_api/Api/StorageIntegrationsApi.cs index c6ea6c9..8dc7abd 100644 --- a/C#/src/dagshub_api/Api/StorageIntegrationsApi.cs +++ b/C#/src/dagshub_api/Api/StorageIntegrationsApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -37,9 +37,10 @@ public interface IStorageIntegrationsApi : IApiAccessor /// path of a folder in the repository /// (optional, default to false) /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) + /// Whether or not paging is enabled (optional, default to false) + /// [Only if paging is enabled] token, from which to continue iteration (optional) /// Files1 - Files1 GetBucketContent (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null); + Files1 GetBucketContent (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, bool? paging = null, string fromToken = null); /// /// List contents in the path @@ -55,9 +56,10 @@ public interface IStorageIntegrationsApi : IApiAccessor /// path of a folder in the repository /// (optional, default to false) /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) + /// Whether or not paging is enabled (optional, default to false) + /// [Only if paging is enabled] token, from which to continue iteration (optional) /// ApiResponse of Files1 - ApiResponse GetBucketContentWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null); + ApiResponse GetBucketContentWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, bool? paging = null, string fromToken = null); /// /// Get file in the bucket /// @@ -126,9 +128,10 @@ public interface IStorageIntegrationsApi : IApiAccessor /// path of a folder in the repository /// (optional, default to false) /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) + /// Whether or not paging is enabled (optional, default to false) + /// [Only if paging is enabled] token, from which to continue iteration (optional) /// Task of Files1 - System.Threading.Tasks.Task GetBucketContentAsync (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null); + System.Threading.Tasks.Task GetBucketContentAsync (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, bool? paging = null, string fromToken = null); /// /// List contents in the path @@ -144,9 +147,10 @@ public interface IStorageIntegrationsApi : IApiAccessor /// path of a folder in the repository /// (optional, default to false) /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) + /// Whether or not paging is enabled (optional, default to false) + /// [Only if paging is enabled] token, from which to continue iteration (optional) /// Task of ApiResponse (Files1) - System.Threading.Tasks.Task> GetBucketContentAsyncWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null); + System.Threading.Tasks.Task> GetBucketContentAsyncWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, bool? paging = null, string fromToken = null); /// /// Get file in the bucket /// @@ -321,11 +325,12 @@ public void AddDefaultHeader(string key, string value) /// path of a folder in the repository /// (optional, default to false) /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) + /// Whether or not paging is enabled (optional, default to false) + /// [Only if paging is enabled] token, from which to continue iteration (optional) /// Files1 - public Files1 GetBucketContent (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null) + public Files1 GetBucketContent (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, bool? paging = null, string fromToken = null) { - ApiResponse localVarResponse = GetBucketContentWithHttpInfo(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); + ApiResponse localVarResponse = GetBucketContentWithHttpInfo(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken); return localVarResponse.Data; } @@ -340,9 +345,10 @@ public Files1 GetBucketContent (string owner, string repo, string protocol, stri /// path of a folder in the repository /// (optional, default to false) /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) + /// Whether or not paging is enabled (optional, default to false) + /// [Only if paging is enabled] token, from which to continue iteration (optional) /// ApiResponse of Files1 - public ApiResponse< Files1 > GetBucketContentWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null) + public ApiResponse< Files1 > GetBucketContentWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, bool? paging = null, string fromToken = null) { // verify the required parameter 'owner' is set if (owner == null) @@ -388,6 +394,7 @@ public ApiResponse< Files1 > GetBucketContentWithHttpInfo (string owner, string if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter if (includeSize != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "include_size", includeSize)); // query parameter if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (paging != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "paging", paging)); // query parameter if (fromToken != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "from_token", fromToken)); // query parameter // authentication (basicAuth) required // http basic authentication required @@ -430,11 +437,12 @@ public ApiResponse< Files1 > GetBucketContentWithHttpInfo (string owner, string /// path of a folder in the repository /// (optional, default to false) /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) + /// Whether or not paging is enabled (optional, default to false) + /// [Only if paging is enabled] token, from which to continue iteration (optional) /// Task of Files1 - public async System.Threading.Tasks.Task GetBucketContentAsync (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null) + public async System.Threading.Tasks.Task GetBucketContentAsync (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, bool? paging = null, string fromToken = null) { - ApiResponse localVarResponse = await GetBucketContentAsyncWithHttpInfo(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); + ApiResponse localVarResponse = await GetBucketContentAsyncWithHttpInfo(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken); return localVarResponse.Data; } @@ -450,9 +458,10 @@ public async System.Threading.Tasks.Task GetBucketContentAsync (string o /// path of a folder in the repository /// (optional, default to false) /// Maximum amount of items to return (optional, default to 100) - /// Token, from which to continue iteration (optional) + /// Whether or not paging is enabled (optional, default to false) + /// [Only if paging is enabled] token, from which to continue iteration (optional) /// Task of ApiResponse (Files1) - public async System.Threading.Tasks.Task> GetBucketContentAsyncWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, string fromToken = null) + public async System.Threading.Tasks.Task> GetBucketContentAsyncWithHttpInfo (string owner, string repo, string protocol, string bucket, string path, bool? includeSize = null, int? limit = null, bool? paging = null, string fromToken = null) { // verify the required parameter 'owner' is set if (owner == null) @@ -498,6 +507,7 @@ public async System.Threading.Tasks.Task> GetBucketContentAs if (path != null) localVarPathParams.Add("path", this.Configuration.ApiClient.ParameterToString(path)); // path parameter if (includeSize != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "include_size", includeSize)); // query parameter if (limit != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "limit", limit)); // query parameter + if (paging != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "paging", paging)); // query parameter if (fromToken != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "from_token", fromToken)); // query parameter // authentication (basicAuth) required // http basic authentication required diff --git a/C#/src/dagshub_api/Api/UserApi.cs b/C#/src/dagshub_api/Api/UserApi.cs index 0b6a847..55db790 100644 --- a/C#/src/dagshub_api/Api/UserApi.cs +++ b/C#/src/dagshub_api/Api/UserApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Api/WebhooksApi.cs b/C#/src/dagshub_api/Api/WebhooksApi.cs index 3a99a88..1dabf90 100644 --- a/C#/src/dagshub_api/Api/WebhooksApi.cs +++ b/C#/src/dagshub_api/Api/WebhooksApi.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Client/ApiClient.cs b/C#/src/dagshub_api/Client/ApiClient.cs index 94987b2..e00b17b 100644 --- a/C#/src/dagshub_api/Client/ApiClient.cs +++ b/C#/src/dagshub_api/Client/ApiClient.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Client/ApiException.cs b/C#/src/dagshub_api/Client/ApiException.cs index 26b264c..73b8575 100644 --- a/C#/src/dagshub_api/Client/ApiException.cs +++ b/C#/src/dagshub_api/Client/ApiException.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Client/ApiResponse.cs b/C#/src/dagshub_api/Client/ApiResponse.cs index 404685f..ef85e3f 100644 --- a/C#/src/dagshub_api/Client/ApiResponse.cs +++ b/C#/src/dagshub_api/Client/ApiResponse.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Client/Configuration.cs b/C#/src/dagshub_api/Client/Configuration.cs index 66b37b2..2548211 100644 --- a/C#/src/dagshub_api/Client/Configuration.cs +++ b/C#/src/dagshub_api/Client/Configuration.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -437,7 +437,7 @@ public static String ToDebugReport() String report = "C# SDK (dagshub_api) Debug Report:\n"; report += " OS: " + System.Environment.OSVersion + "\n"; report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.0.2\n"; + report += " Version of the API: 1.0.3\n"; report += " SDK Package Version: 1.0.3\n"; return report; diff --git a/C#/src/dagshub_api/Client/ExceptionFactory.cs b/C#/src/dagshub_api/Client/ExceptionFactory.cs index d34648f..16aad8b 100644 --- a/C#/src/dagshub_api/Client/ExceptionFactory.cs +++ b/C#/src/dagshub_api/Client/ExceptionFactory.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Client/GlobalConfiguration.cs b/C#/src/dagshub_api/Client/GlobalConfiguration.cs index 87abb12..14a2112 100644 --- a/C#/src/dagshub_api/Client/GlobalConfiguration.cs +++ b/C#/src/dagshub_api/Client/GlobalConfiguration.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Client/IApiAccessor.cs b/C#/src/dagshub_api/Client/IApiAccessor.cs index aa06f6b..29d4f54 100644 --- a/C#/src/dagshub_api/Client/IApiAccessor.cs +++ b/C#/src/dagshub_api/Client/IApiAccessor.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Client/IReadableConfiguration.cs b/C#/src/dagshub_api/Client/IReadableConfiguration.cs index c7aa0e2..f08ba5b 100644 --- a/C#/src/dagshub_api/Client/IReadableConfiguration.cs +++ b/C#/src/dagshub_api/Client/IReadableConfiguration.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Client/SwaggerDateConverter.cs b/C#/src/dagshub_api/Client/SwaggerDateConverter.cs index fcdda3a..58d0925 100644 --- a/C#/src/dagshub_api/Client/SwaggerDateConverter.cs +++ b/C#/src/dagshub_api/Client/SwaggerDateConverter.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/CollaboratorsCollaboratorBody.cs b/C#/src/dagshub_api/Model/CollaboratorsCollaboratorBody.cs index 8305228..85c445d 100644 --- a/C#/src/dagshub_api/Model/CollaboratorsCollaboratorBody.cs +++ b/C#/src/dagshub_api/Model/CollaboratorsCollaboratorBody.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/CreateAnnotatorTeam.cs b/C#/src/dagshub_api/Model/CreateAnnotatorTeam.cs new file mode 100644 index 0000000..3e9a7fa --- /dev/null +++ b/C#/src/dagshub_api/Model/CreateAnnotatorTeam.cs @@ -0,0 +1,229 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; + +namespace dagshub_api.Model +{ + /// + /// CreateAnnotatorTeam + /// + [DataContract] + public partial class CreateAnnotatorTeam : IEquatable, IValidatableObject + { + /// + /// Type of team - normal teams have repository access, annotator teams only have annotation project access + /// + /// Type of team - normal teams have repository access, annotator teams only have annotation project access + [JsonConverter(typeof(StringEnumConverter))] + public enum TeamTypeEnum + { + /// + /// Enum Normal for value: normal + /// + [EnumMember(Value = "normal")] + Normal = 1, + /// + /// Enum Annotator for value: annotator + /// + [EnumMember(Value = "annotator")] + Annotator = 2 } + /// + /// Type of team - normal teams have repository access, annotator teams only have annotation project access + /// + /// Type of team - normal teams have repository access, annotator teams only have annotation project access + [DataMember(Name="team_type", EmitDefaultValue=false)] + public TeamTypeEnum? TeamType { get; set; } + /// + /// Repository permission level (required for normal teams, ignored for annotator teams) + /// + /// Repository permission level (required for normal teams, ignored for annotator teams) + [JsonConverter(typeof(StringEnumConverter))] + public enum PermissionEnum + { + /// + /// Enum Read for value: read + /// + [EnumMember(Value = "read")] + Read = 1, + /// + /// Enum Write for value: write + /// + [EnumMember(Value = "write")] + Write = 2, + /// + /// Enum Admin for value: admin + /// + [EnumMember(Value = "admin")] + Admin = 3 } + /// + /// Repository permission level (required for normal teams, ignored for annotator teams) + /// + /// Repository permission level (required for normal teams, ignored for annotator teams) + [DataMember(Name="permission", EmitDefaultValue=false)] + public PermissionEnum? Permission { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Team name (required). + /// Team description. + /// Type of team - normal teams have repository access, annotator teams only have annotation project access (default to TeamTypeEnum.Normal). + /// Repository permission level (required for normal teams, ignored for annotator teams). + public CreateAnnotatorTeam(string name = default(string), string description = default(string), TeamTypeEnum? teamType = TeamTypeEnum.Normal, PermissionEnum? permission = default(PermissionEnum?)) + { + // to ensure "name" is required (not null) + if (name == null) + { + throw new InvalidDataException("name is a required property for CreateAnnotatorTeam and cannot be null"); + } + else + { + this.Name = name; + } + this.Description = description; + // use default value if no "teamType" provided + if (teamType == null) + { + this.TeamType = TeamTypeEnum.Normal; + } + else + { + this.TeamType = teamType; + } + this.Permission = permission; + } + + /// + /// Team name + /// + /// Team name + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// Team description + /// + /// Team description + [DataMember(Name="description", EmitDefaultValue=false)] + public string Description { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CreateAnnotatorTeam {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" Description: ").Append(Description).Append("\n"); + sb.Append(" TeamType: ").Append(TeamType).Append("\n"); + sb.Append(" Permission: ").Append(Permission).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as CreateAnnotatorTeam); + } + + /// + /// Returns true if CreateAnnotatorTeam instances are equal + /// + /// Instance of CreateAnnotatorTeam to be compared + /// Boolean + public bool Equals(CreateAnnotatorTeam input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.Description == input.Description || + (this.Description != null && + this.Description.Equals(input.Description)) + ) && + ( + this.TeamType == input.TeamType || + (this.TeamType != null && + this.TeamType.Equals(input.TeamType)) + ) && + ( + this.Permission == input.Permission || + (this.Permission != null && + this.Permission.Equals(input.Permission)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.Description != null) + hashCode = hashCode * 59 + this.Description.GetHashCode(); + if (this.TeamType != null) + hashCode = hashCode * 59 + this.TeamType.GetHashCode(); + if (this.Permission != null) + hashCode = hashCode * 59 + this.Permission.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/C#/src/dagshub_api/Model/CreateRepo.cs b/C#/src/dagshub_api/Model/CreateRepo.cs index 495779c..917ed91 100644 --- a/C#/src/dagshub_api/Model/CreateRepo.cs +++ b/C#/src/dagshub_api/Model/CreateRepo.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/EditExperimentPost.cs b/C#/src/dagshub_api/Model/EditExperimentPost.cs index 364eae6..fbd30d3 100644 --- a/C#/src/dagshub_api/Model/EditExperimentPost.cs +++ b/C#/src/dagshub_api/Model/EditExperimentPost.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/ExperimentKeys.cs b/C#/src/dagshub_api/Model/ExperimentKeys.cs index 11ea7f6..48891d4 100644 --- a/C#/src/dagshub_api/Model/ExperimentKeys.cs +++ b/C#/src/dagshub_api/Model/ExperimentKeys.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/File.cs b/C#/src/dagshub_api/Model/File.cs index 04c6f91..cbae953 100644 --- a/C#/src/dagshub_api/Model/File.cs +++ b/C#/src/dagshub_api/Model/File.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/Files.cs b/C#/src/dagshub_api/Model/Files.cs index 5e981fe..7c4e10f 100644 --- a/C#/src/dagshub_api/Model/Files.cs +++ b/C#/src/dagshub_api/Model/Files.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/Files1.cs b/C#/src/dagshub_api/Model/Files1.cs index b1cd46b..62bf5df 100644 --- a/C#/src/dagshub_api/Model/Files1.cs +++ b/C#/src/dagshub_api/Model/Files1.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ @@ -33,12 +33,10 @@ public partial class Files1 : IEquatable, IValidatableObject /// Initializes a new instance of the class. /// /// entries. - /// limit. - /// nextToken. - public Files1(List entries = default(List), int? limit = default(int?), string nextToken = default(string)) + /// Next token to continue pagination from. + public Files1(List entries = default(List), string nextToken = default(string)) { this.Entries = entries; - this.Limit = limit; this.NextToken = nextToken; } @@ -49,14 +47,9 @@ public partial class Files1 : IEquatable, IValidatableObject public List Entries { get; set; } /// - /// Gets or Sets Limit - /// - [DataMember(Name="limit", EmitDefaultValue=false)] - public int? Limit { get; set; } - - /// - /// Gets or Sets NextToken + /// Next token to continue pagination from /// + /// Next token to continue pagination from [DataMember(Name="next_token", EmitDefaultValue=false)] public string NextToken { get; set; } @@ -69,7 +62,6 @@ public override string ToString() var sb = new StringBuilder(); sb.Append("class Files1 {\n"); sb.Append(" Entries: ").Append(Entries).Append("\n"); - sb.Append(" Limit: ").Append(Limit).Append("\n"); sb.Append(" NextToken: ").Append(NextToken).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -111,11 +103,6 @@ public bool Equals(Files1 input) input.Entries != null && this.Entries.SequenceEqual(input.Entries) ) && - ( - this.Limit == input.Limit || - (this.Limit != null && - this.Limit.Equals(input.Limit)) - ) && ( this.NextToken == input.NextToken || (this.NextToken != null && @@ -134,8 +121,6 @@ public override int GetHashCode() int hashCode = 41; if (this.Entries != null) hashCode = hashCode * 59 + this.Entries.GetHashCode(); - if (this.Limit != null) - hashCode = hashCode * 59 + this.Limit.GetHashCode(); if (this.NextToken != null) hashCode = hashCode * 59 + this.NextToken.GetHashCode(); return hashCode; diff --git a/C#/src/dagshub_api/Model/GrantLabelStudioAccess.cs b/C#/src/dagshub_api/Model/GrantLabelStudioAccess.cs new file mode 100644 index 0000000..8002033 --- /dev/null +++ b/C#/src/dagshub_api/Model/GrantLabelStudioAccess.cs @@ -0,0 +1,173 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; + +namespace dagshub_api.Model +{ + /// + /// GrantLabelStudioAccess + /// + [DataContract] + public partial class GrantLabelStudioAccess : IEquatable, IValidatableObject + { + /// + /// Access level to grant + /// + /// Access level to grant + [JsonConverter(typeof(StringEnumConverter))] + public enum AccessLevelEnum + { + /// + /// Enum Annotator for value: annotator + /// + [EnumMember(Value = "annotator")] + Annotator = 1, + /// + /// Enum None for value: none + /// + [EnumMember(Value = "none")] + None = 2 } + /// + /// Access level to grant + /// + /// Access level to grant + [DataMember(Name="access_level", EmitDefaultValue=false)] + public AccessLevelEnum? AccessLevel { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// Project ID, -1 for wildcard access to all projects (required). + /// Access level to grant (default to AccessLevelEnum.Annotator). + public GrantLabelStudioAccess(long? projectId = default(long?), AccessLevelEnum? accessLevel = AccessLevelEnum.Annotator) + { + // to ensure "projectId" is required (not null) + if (projectId == null) + { + throw new InvalidDataException("projectId is a required property for GrantLabelStudioAccess and cannot be null"); + } + else + { + this.ProjectId = projectId; + } + // use default value if no "accessLevel" provided + if (accessLevel == null) + { + this.AccessLevel = AccessLevelEnum.Annotator; + } + else + { + this.AccessLevel = accessLevel; + } + } + + /// + /// Project ID, -1 for wildcard access to all projects + /// + /// Project ID, -1 for wildcard access to all projects + [DataMember(Name="project_id", EmitDefaultValue=false)] + public long? ProjectId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class GrantLabelStudioAccess {\n"); + sb.Append(" ProjectId: ").Append(ProjectId).Append("\n"); + sb.Append(" AccessLevel: ").Append(AccessLevel).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as GrantLabelStudioAccess); + } + + /// + /// Returns true if GrantLabelStudioAccess instances are equal + /// + /// Instance of GrantLabelStudioAccess to be compared + /// Boolean + public bool Equals(GrantLabelStudioAccess input) + { + if (input == null) + return false; + + return + ( + this.ProjectId == input.ProjectId || + (this.ProjectId != null && + this.ProjectId.Equals(input.ProjectId)) + ) && + ( + this.AccessLevel == input.AccessLevel || + (this.AccessLevel != null && + this.AccessLevel.Equals(input.AccessLevel)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.ProjectId != null) + hashCode = hashCode * 59 + this.ProjectId.GetHashCode(); + if (this.AccessLevel != null) + hashCode = hashCode * 59 + this.AccessLevel.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/C#/src/dagshub_api/Model/HooksIdBody.cs b/C#/src/dagshub_api/Model/HooksIdBody.cs index d8e242b..d847924 100644 --- a/C#/src/dagshub_api/Model/HooksIdBody.cs +++ b/C#/src/dagshub_api/Model/HooksIdBody.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/InlineResponse200.cs b/C#/src/dagshub_api/Model/InlineResponse200.cs new file mode 100644 index 0000000..a95baf5 --- /dev/null +++ b/C#/src/dagshub_api/Model/InlineResponse200.cs @@ -0,0 +1,170 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; + +namespace dagshub_api.Model +{ + /// + /// InlineResponse200 + /// + [DataContract] + public partial class InlineResponse200 : IEquatable, IValidatableObject + { + /// + /// Defines AccessLevel + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum AccessLevelEnum + { + /// + /// Enum None for value: none + /// + [EnumMember(Value = "none")] + None = 1, + /// + /// Enum Annotator for value: annotator + /// + [EnumMember(Value = "annotator")] + Annotator = 2 } + /// + /// Gets or Sets AccessLevel + /// + [DataMember(Name="access_level", EmitDefaultValue=false)] + public AccessLevelEnum? AccessLevel { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// userId. + /// projectId. + /// accessLevel. + public InlineResponse200(long? userId = default(long?), long? projectId = default(long?), AccessLevelEnum? accessLevel = default(AccessLevelEnum?)) + { + this.UserId = userId; + this.ProjectId = projectId; + this.AccessLevel = accessLevel; + } + + /// + /// Gets or Sets UserId + /// + [DataMember(Name="user_id", EmitDefaultValue=false)] + public long? UserId { get; set; } + + /// + /// Gets or Sets ProjectId + /// + [DataMember(Name="project_id", EmitDefaultValue=false)] + public long? ProjectId { get; set; } + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse200 {\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" ProjectId: ").Append(ProjectId).Append("\n"); + sb.Append(" AccessLevel: ").Append(AccessLevel).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as InlineResponse200); + } + + /// + /// Returns true if InlineResponse200 instances are equal + /// + /// Instance of InlineResponse200 to be compared + /// Boolean + public bool Equals(InlineResponse200 input) + { + if (input == null) + return false; + + return + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.ProjectId == input.ProjectId || + (this.ProjectId != null && + this.ProjectId.Equals(input.ProjectId)) + ) && + ( + this.AccessLevel == input.AccessLevel || + (this.AccessLevel != null && + this.AccessLevel.Equals(input.AccessLevel)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + if (this.ProjectId != null) + hashCode = hashCode * 59 + this.ProjectId.GetHashCode(); + if (this.AccessLevel != null) + hashCode = hashCode * 59 + this.AccessLevel.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/C#/src/dagshub_api/Model/Integration.cs b/C#/src/dagshub_api/Model/Integration.cs index 745578f..9f6a5ca 100644 --- a/C#/src/dagshub_api/Model/Integration.cs +++ b/C#/src/dagshub_api/Model/Integration.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/IntegrationInner.cs b/C#/src/dagshub_api/Model/IntegrationInner.cs index 9e32419..331a577 100644 --- a/C#/src/dagshub_api/Model/IntegrationInner.cs +++ b/C#/src/dagshub_api/Model/IntegrationInner.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/Issue.cs b/C#/src/dagshub_api/Model/Issue.cs index 3254e66..11cc23b 100644 --- a/C#/src/dagshub_api/Model/Issue.cs +++ b/C#/src/dagshub_api/Model/Issue.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/IssueAssignee.cs b/C#/src/dagshub_api/Model/IssueAssignee.cs index c62c743..382bf4c 100644 --- a/C#/src/dagshub_api/Model/IssueAssignee.cs +++ b/C#/src/dagshub_api/Model/IssueAssignee.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/IssueLabels.cs b/C#/src/dagshub_api/Model/IssueLabels.cs index 8dfd38f..91a4415 100644 --- a/C#/src/dagshub_api/Model/IssueLabels.cs +++ b/C#/src/dagshub_api/Model/IssueLabels.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/IssueMilestone.cs b/C#/src/dagshub_api/Model/IssueMilestone.cs index 870ec33..a846124 100644 --- a/C#/src/dagshub_api/Model/IssueMilestone.cs +++ b/C#/src/dagshub_api/Model/IssueMilestone.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/Issues.cs b/C#/src/dagshub_api/Model/Issues.cs index 1ec6b7c..cf8e0cc 100644 --- a/C#/src/dagshub_api/Model/Issues.cs +++ b/C#/src/dagshub_api/Model/Issues.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/LabelStudioProjectAccess.cs b/C#/src/dagshub_api/Model/LabelStudioProjectAccess.cs new file mode 100644 index 0000000..403b887 --- /dev/null +++ b/C#/src/dagshub_api/Model/LabelStudioProjectAccess.cs @@ -0,0 +1,253 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * Generated by: https://github.com/swagger-api/swagger-codegen.git + */ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using SwaggerDateConverter = dagshub_api.Client.SwaggerDateConverter; + +namespace dagshub_api.Model +{ + /// + /// LabelStudioProjectAccess + /// + [DataContract] + public partial class LabelStudioProjectAccess : IEquatable, IValidatableObject + { + /// + /// Defines AccessLevel + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum AccessLevelEnum + { + /// + /// Enum None for value: none + /// + [EnumMember(Value = "none")] + None = 1, + /// + /// Enum Annotator for value: annotator + /// + [EnumMember(Value = "annotator")] + Annotator = 2 } + /// + /// Gets or Sets AccessLevel + /// + [DataMember(Name="access_level", EmitDefaultValue=false)] + public AccessLevelEnum? AccessLevel { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// id. + /// repoId. + /// Project ID, -1 means wildcard access to all projects. + /// User ID (present for user access entries). + /// Team ID (present for team access entries). + /// accessLevel. + /// createdUnix. + /// user. + public LabelStudioProjectAccess(long? id = default(long?), long? repoId = default(long?), long? projectId = default(long?), long? userId = default(long?), long? teamId = default(long?), AccessLevelEnum? accessLevel = default(AccessLevelEnum?), long? createdUnix = default(long?), User user = default(User)) + { + this.Id = id; + this.RepoId = repoId; + this.ProjectId = projectId; + this.UserId = userId; + this.TeamId = teamId; + this.AccessLevel = accessLevel; + this.CreatedUnix = createdUnix; + this.User = user; + } + + /// + /// Gets or Sets Id + /// + [DataMember(Name="id", EmitDefaultValue=false)] + public long? Id { get; set; } + + /// + /// Gets or Sets RepoId + /// + [DataMember(Name="repo_id", EmitDefaultValue=false)] + public long? RepoId { get; set; } + + /// + /// Project ID, -1 means wildcard access to all projects + /// + /// Project ID, -1 means wildcard access to all projects + [DataMember(Name="project_id", EmitDefaultValue=false)] + public long? ProjectId { get; set; } + + /// + /// User ID (present for user access entries) + /// + /// User ID (present for user access entries) + [DataMember(Name="user_id", EmitDefaultValue=false)] + public long? UserId { get; set; } + + /// + /// Team ID (present for team access entries) + /// + /// Team ID (present for team access entries) + [DataMember(Name="team_id", EmitDefaultValue=false)] + public long? TeamId { get; set; } + + + /// + /// Gets or Sets CreatedUnix + /// + [DataMember(Name="created_unix", EmitDefaultValue=false)] + public long? CreatedUnix { get; set; } + + /// + /// Gets or Sets User + /// + [DataMember(Name="user", EmitDefaultValue=false)] + public User User { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LabelStudioProjectAccess {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" RepoId: ").Append(RepoId).Append("\n"); + sb.Append(" ProjectId: ").Append(ProjectId).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" TeamId: ").Append(TeamId).Append("\n"); + sb.Append(" AccessLevel: ").Append(AccessLevel).Append("\n"); + sb.Append(" CreatedUnix: ").Append(CreatedUnix).Append("\n"); + sb.Append(" User: ").Append(User).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as LabelStudioProjectAccess); + } + + /// + /// Returns true if LabelStudioProjectAccess instances are equal + /// + /// Instance of LabelStudioProjectAccess to be compared + /// Boolean + public bool Equals(LabelStudioProjectAccess input) + { + if (input == null) + return false; + + return + ( + this.Id == input.Id || + (this.Id != null && + this.Id.Equals(input.Id)) + ) && + ( + this.RepoId == input.RepoId || + (this.RepoId != null && + this.RepoId.Equals(input.RepoId)) + ) && + ( + this.ProjectId == input.ProjectId || + (this.ProjectId != null && + this.ProjectId.Equals(input.ProjectId)) + ) && + ( + this.UserId == input.UserId || + (this.UserId != null && + this.UserId.Equals(input.UserId)) + ) && + ( + this.TeamId == input.TeamId || + (this.TeamId != null && + this.TeamId.Equals(input.TeamId)) + ) && + ( + this.AccessLevel == input.AccessLevel || + (this.AccessLevel != null && + this.AccessLevel.Equals(input.AccessLevel)) + ) && + ( + this.CreatedUnix == input.CreatedUnix || + (this.CreatedUnix != null && + this.CreatedUnix.Equals(input.CreatedUnix)) + ) && + ( + this.User == input.User || + (this.User != null && + this.User.Equals(input.User)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Id != null) + hashCode = hashCode * 59 + this.Id.GetHashCode(); + if (this.RepoId != null) + hashCode = hashCode * 59 + this.RepoId.GetHashCode(); + if (this.ProjectId != null) + hashCode = hashCode * 59 + this.ProjectId.GetHashCode(); + if (this.UserId != null) + hashCode = hashCode * 59 + this.UserId.GetHashCode(); + if (this.TeamId != null) + hashCode = hashCode * 59 + this.TeamId.GetHashCode(); + if (this.AccessLevel != null) + hashCode = hashCode * 59 + this.AccessLevel.GetHashCode(); + if (this.CreatedUnix != null) + hashCode = hashCode * 59 + this.CreatedUnix.GetHashCode(); + if (this.User != null) + hashCode = hashCode * 59 + this.User.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } +} diff --git a/C#/src/dagshub_api/Model/Labels.cs b/C#/src/dagshub_api/Model/Labels.cs index 4de30df..a04d35b 100644 --- a/C#/src/dagshub_api/Model/Labels.cs +++ b/C#/src/dagshub_api/Model/Labels.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/MigrateRepo.cs b/C#/src/dagshub_api/Model/MigrateRepo.cs index 515224d..0b5726d 100644 --- a/C#/src/dagshub_api/Model/MigrateRepo.cs +++ b/C#/src/dagshub_api/Model/MigrateRepo.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/PatchIssue.cs b/C#/src/dagshub_api/Model/PatchIssue.cs index 78e0101..4abfd28 100644 --- a/C#/src/dagshub_api/Model/PatchIssue.cs +++ b/C#/src/dagshub_api/Model/PatchIssue.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/PostIssue.cs b/C#/src/dagshub_api/Model/PostIssue.cs index 5e7935c..e2c1219 100644 --- a/C#/src/dagshub_api/Model/PostIssue.cs +++ b/C#/src/dagshub_api/Model/PostIssue.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/PutFile.cs b/C#/src/dagshub_api/Model/PutFile.cs index 28c7460..af87d8c 100644 --- a/C#/src/dagshub_api/Model/PutFile.cs +++ b/C#/src/dagshub_api/Model/PutFile.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/RepoHooksBody.cs b/C#/src/dagshub_api/Model/RepoHooksBody.cs index 2e0e502..03bf122 100644 --- a/C#/src/dagshub_api/Model/RepoHooksBody.cs +++ b/C#/src/dagshub_api/Model/RepoHooksBody.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/State.cs b/C#/src/dagshub_api/Model/State.cs index 5958b32..fa4d482 100644 --- a/C#/src/dagshub_api/Model/State.cs +++ b/C#/src/dagshub_api/Model/State.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/User.cs b/C#/src/dagshub_api/Model/User.cs index c61ded0..81a8f4e 100644 --- a/C#/src/dagshub_api/Model/User.cs +++ b/C#/src/dagshub_api/Model/User.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/WebhookConfig.cs b/C#/src/dagshub_api/Model/WebhookConfig.cs index 717bd28..bf0ddb2 100644 --- a/C#/src/dagshub_api/Model/WebhookConfig.cs +++ b/C#/src/dagshub_api/Model/WebhookConfig.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/Model/WebhookEvents.cs b/C#/src/dagshub_api/Model/WebhookEvents.cs index 5528f29..0493b53 100644 --- a/C#/src/dagshub_api/Model/WebhookEvents.cs +++ b/C#/src/dagshub_api/Model/WebhookEvents.cs @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * Generated by: https://github.com/swagger-api/swagger-codegen.git */ diff --git a/C#/src/dagshub_api/dagshub_api.csproj b/C#/src/dagshub_api/dagshub_api.csproj index 12026a3..60fd5d6 100644 --- a/C#/src/dagshub_api/dagshub_api.csproj +++ b/C#/src/dagshub_api/dagshub_api.csproj @@ -4,7 +4,7 @@ DagsHub API This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. -OpenAPI spec version: 1.0.2 +OpenAPI spec version: 1.0.3 --> @@ -12,7 +12,7 @@ OpenAPI spec version: 1.0.2 Debug AnyCPU - {BB7FDD9F-1657-4C83-B5E3-E416BEC4C698} + {DC4E8379-1DB2-416F-B33C-82A82758E481} Library Properties dagshub_api diff --git a/Go/README.md b/Go/README.md index 89fa403..1c7c0f4 100644 --- a/Go/README.md +++ b/Go/README.md @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositori ## Overview This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. -- API version: 1.0.2 +- API version: 1.0.3 - Package version: 1.0.3 - Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen @@ -21,6 +21,14 @@ All URIs are relative to *https://dagshub.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AnnotationsApi* | [**GetLabelStudioTeamAccess**](docs/AnnotationsApi.md#getlabelstudioteamaccess) | **Get** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +*AnnotationsApi* | [**GetLabelStudioUserAccess**](docs/AnnotationsApi.md#getlabelstudiouseraccess) | **Get** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +*AnnotationsApi* | [**GrantLabelStudioTeamAccess**](docs/AnnotationsApi.md#grantlabelstudioteamaccess) | **Put** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +*AnnotationsApi* | [**GrantLabelStudioUserAccess**](docs/AnnotationsApi.md#grantlabelstudiouseraccess) | **Put** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +*AnnotationsApi* | [**ListLabelStudioTeamAccess**](docs/AnnotationsApi.md#listlabelstudioteamaccess) | **Get** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +*AnnotationsApi* | [**ListLabelStudioUserAccess**](docs/AnnotationsApi.md#listlabelstudiouseraccess) | **Get** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +*AnnotationsApi* | [**RevokeLabelStudioTeamAccess**](docs/AnnotationsApi.md#revokelabelstudioteamaccess) | **Delete** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +*AnnotationsApi* | [**RevokeLabelStudioUserAccess**](docs/AnnotationsApi.md#revokelabelstudiouseraccess) | **Delete** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects *BranchesApi* | [**GetBranch**](docs/BranchesApi.md#getbranch) | **Get** /repos/{owner}/{repo}/branches/{branch} | Get Branch *BranchesApi* | [**ListBranches**](docs/BranchesApi.md#listbranches) | **Get** /repos/{owner}/{repo}/branches | List Branches *CollaboratorsApi* | [**AddCollaborator**](docs/CollaboratorsApi.md#addcollaborator) | **Put** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator @@ -41,6 +49,7 @@ Class | Method | HTTP request | Description *IssuesApi* | [**EditIssue**](docs/IssuesApi.md#editissue) | **Patch** /repos/{owner}/{repo}/issues | Edit an issue *IssuesApi* | [**GetIssue**](docs/IssuesApi.md#getissue) | **Get** /repos/{owner}/{repo}/issues/{index} | Get a single issue *IssuesApi* | [**ListRepoIssues**](docs/IssuesApi.md#listrepoissues) | **Get** /repos/{owner}/{repo}/issues | List issues for a repository +*OrganizationsApi* | [**CreateOrgTeam**](docs/OrganizationsApi.md#createorgteam) | **Post** /admin/orgs/{orgname}/teams | Create an organization team *ReleasesApi* | [**ListReleases**](docs/ReleasesApi.md#listreleases) | **Get** /repos/{owner}/{repo}/releases | List Releases *RepositoryApi* | [**CreateOrgRepo**](docs/RepositoryApi.md#createorgrepo) | **Post** /org/{orgname}/repos | Create in organization *RepositoryApi* | [**CreateRepo**](docs/RepositoryApi.md#createrepo) | **Post** /user/repos | Create @@ -63,17 +72,21 @@ Class | Method | HTTP request | Description ## Documentation For Models - [CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) + - [CreateAnnotatorTeam](docs/CreateAnnotatorTeam.md) - [CreateRepo](docs/CreateRepo.md) - [EditExperimentPost](docs/EditExperimentPost.md) - [ExperimentKeys](docs/ExperimentKeys.md) - [File](docs/File.md) - [Files1](docs/Files1.md) + - [GrantLabelStudioAccess](docs/GrantLabelStudioAccess.md) - [HooksIdBody](docs/HooksIdBody.md) + - [InlineResponse200](docs/InlineResponse200.md) - [IntegrationInner](docs/IntegrationInner.md) - [Issue](docs/Issue.md) - [IssueAssignee](docs/IssueAssignee.md) - [IssueLabels](docs/IssueLabels.md) - [IssueMilestone](docs/IssueMilestone.md) + - [LabelStudioProjectAccess](docs/LabelStudioProjectAccess.md) - [MigrateRepo](docs/MigrateRepo.md) - [PatchIssue](docs/PatchIssue.md) - [PostIssue](docs/PostIssue.md) diff --git a/Go/api/swagger.yaml b/Go/api/swagger.yaml index 654f63a..8bc125e 100644 --- a/Go/api/swagger.yaml +++ b/Go/api/swagger.yaml @@ -4,7 +4,7 @@ info: description: | This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. - version: 1.0.2 + version: 1.0.3 servers: - url: https://dagshub.com/api/v1 security: @@ -216,9 +216,16 @@ paths: schema: type: integer default: 100 + - name: paging + in: query + description: Whether or not paging is enabled + schema: + type: boolean + default: false + example: false - name: from_token in: query - description: "Token, from which to continue iteration" + description: "[Only if paging is enabled] token, from which to continue iteration" schema: type: string responses: @@ -286,8 +293,7 @@ paths: versioning: bucket download_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/raw/s3/spacenet-dataset/LICENSE.md content_url: https://dagshub.com/api/v1/repos/DagsHub-Datasets/spacenet-dataset/storage/content/s3/spacenet-dataset/LICENSE.md - limit: 8 - next_token: "" + next_token: next-token "404": description: Folder or file not found /repos/{owner}/{repo}/storage/raw/{protocol}/{bucket}/{path}: @@ -1301,6 +1307,367 @@ paths: admin: false push: true pull: true + /repos/{owner}/{repo}/annotations/access/users: + get: + tags: + - Annotations + summary: List user access entries for annotation projects + description: Get a list of users with access to Label Studio annotation projects + in the repository + operationId: listLabelStudioUserAccess + parameters: + - name: owner + in: path + description: owner of the repository + required: true + schema: + type: string + example: OperationSavta + - name: repo + in: path + description: name of the repository + required: true + schema: + type: string + example: SavtaDepth + - name: project_id + in: query + description: "Label Studio project ID to filter by. If not specified, returns\ + \ access for all projects. Use -1 for wildcard access." + required: false + schema: + type: integer + format: int64 + responses: + "200": + description: Successfully retrieved user access entries + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LabelStudioProjectAccess' + x-content-type: application/json + /repos/{owner}/{repo}/annotations/access/users/{userid}: + get: + tags: + - Annotations + summary: Get user access level for annotation projects + description: Get the access level for a specific user and project (or all projects) + operationId: getLabelStudioUserAccess + parameters: + - name: owner + in: path + description: owner of the repository + required: true + schema: + type: string + example: OperationSavta + - name: repo + in: path + description: name of the repository + required: true + schema: + type: string + example: SavtaDepth + - name: userid + in: path + description: User ID + required: true + schema: + type: integer + format: int64 + - name: project_id + in: query + description: "Label Studio project ID to filter by. If not specified, returns\ + \ access for all projects. Use -1 for wildcard access." + required: false + schema: + type: integer + format: int64 + responses: + "200": + description: Successfully retrieved user access level + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200' + put: + tags: + - Annotations + summary: Grant user access to annotation projects + description: Grant a user access to specific Label Studio annotation projects. + User must be an organization member if the repo is owned by an organization. + operationId: grantLabelStudioUserAccess + parameters: + - name: owner + in: path + description: owner of the repository + required: true + schema: + type: string + example: OperationSavta + - name: repo + in: path + description: name of the repository + required: true + schema: + type: string + example: SavtaDepth + - name: userid + in: path + description: User ID + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GrantLabelStudioAccess' + required: true + responses: + "204": + description: Access granted successfully + "400": + description: User must be a member of the organization which owns the repo + "404": + description: User not found + delete: + tags: + - Annotations + summary: Revoke user access to annotation projects + description: Revoke a user's access to Label Studio annotation projects + operationId: revokeLabelStudioUserAccess + parameters: + - name: owner + in: path + description: owner of the repository + required: true + schema: + type: string + example: OperationSavta + - name: repo + in: path + description: name of the repository + required: true + schema: + type: string + example: SavtaDepth + - name: userid + in: path + description: User ID + required: true + schema: + type: integer + format: int64 + - name: project_id + in: query + description: "Label Studio project ID to filter by. If not specified, returns\ + \ access for all projects. Use -1 for wildcard access." + required: false + schema: + type: integer + format: int64 + responses: + "204": + description: Access revoked successfully + "404": + description: User not found + /repos/{owner}/{repo}/annotations/access/teams: + get: + tags: + - Annotations + summary: List team access entries for annotation projects + description: Get a list of teams with access to Label Studio annotation projects + in the repository (organization repositories only) + operationId: listLabelStudioTeamAccess + parameters: + - name: owner + in: path + description: owner of the repository + required: true + schema: + type: string + example: OperationSavta + - name: repo + in: path + description: name of the repository + required: true + schema: + type: string + example: SavtaDepth + - name: project_id + in: query + description: "Label Studio project ID to filter by. If not specified, returns\ + \ access for all projects. Use -1 for wildcard access." + required: false + schema: + type: integer + format: int64 + responses: + "200": + description: Successfully retrieved team access entries + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/LabelStudioProjectAccess' + x-content-type: application/json + /repos/{owner}/{repo}/annotations/access/teams/{teamid}: + get: + tags: + - Annotations + summary: Get team access level for annotation projects + description: Get the access level for a specific team and project (or all projects) + operationId: getLabelStudioTeamAccess + parameters: + - name: owner + in: path + description: owner of the repository + required: true + schema: + type: string + example: OperationSavta + - name: repo + in: path + description: name of the repository + required: true + schema: + type: string + example: SavtaDepth + - name: teamid + in: path + description: Team ID + required: true + schema: + type: integer + format: int64 + - name: project_id + in: query + description: "Label Studio project ID to filter by. If not specified, returns\ + \ access for all projects. Use -1 for wildcard access." + required: false + schema: + type: integer + format: int64 + responses: + "200": + description: Successfully retrieved team access level + content: + application/json: + schema: + $ref: '#/components/schemas/LabelStudioProjectAccess' + put: + tags: + - Annotations + summary: Grant team access to annotation projects + description: Grant a team access to specific Label Studio annotation projects + (organization repositories only) + operationId: grantLabelStudioTeamAccess + parameters: + - name: owner + in: path + description: owner of the repository + required: true + schema: + type: string + example: OperationSavta + - name: repo + in: path + description: name of the repository + required: true + schema: + type: string + example: SavtaDepth + - name: teamid + in: path + description: Team ID + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GrantLabelStudioAccess' + required: true + responses: + "204": + description: Access granted successfully + "404": + description: Team not found + delete: + tags: + - Annotations + summary: Revoke team access to annotation projects + description: Revoke a team's access to Label Studio annotation projects + operationId: revokeLabelStudioTeamAccess + parameters: + - name: owner + in: path + description: owner of the repository + required: true + schema: + type: string + example: OperationSavta + - name: repo + in: path + description: name of the repository + required: true + schema: + type: string + example: SavtaDepth + - name: teamid + in: path + description: Team ID + required: true + schema: + type: integer + format: int64 + - name: project_id + in: query + description: "Label Studio project ID to filter by. If not specified, returns\ + \ access for all projects. Use -1 for wildcard access." + required: false + schema: + type: integer + format: int64 + responses: + "204": + description: Access revoked successfully + "404": + description: Team not found + /admin/orgs/{orgname}/teams: + post: + tags: + - Organizations + summary: Create an organization team + description: Create a new team in an organization. Use team_type "annotator" + to create an annotator team with access only to annotation projects. + operationId: createOrgTeam + parameters: + - name: orgname + in: path + description: A DagsHub organization name + required: true + schema: + type: string + example: DAGsHub-Official + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAnnotatorTeam' + required: true + responses: + "201": + description: Team created successfully + "400": + description: Invalid team type or other validation error /repos/{owner}/{repo}/commits/{sha}: get: tags: @@ -1643,10 +2010,9 @@ components: type: array items: $ref: '#/components/schemas/File' - limit: - type: integer next_token: type: string + description: Next token to continue pagination from example: entries: - path: images/000.png @@ -1663,7 +2029,6 @@ components: content_url: https://dagshub.com/Simon/baby-yoda-segmentation-dataset/content/master/images/000.png type: "[file]" hash: 79fb7f8632d7e15b3b46a7411d08bcdd - limit: 0 next_token: next_token Issues: type: array @@ -1892,6 +2257,97 @@ components: type: string description: Description of the repository example: This is a repository + LabelStudioProjectAccess: + type: object + properties: + id: + type: integer + format: int64 + repo_id: + type: integer + format: int64 + project_id: + type: integer + description: "Project ID, -1 means wildcard access to all projects" + format: int64 + user_id: + type: integer + description: User ID (present for user access entries) + format: int64 + team_id: + type: integer + description: Team ID (present for team access entries) + format: int64 + access_level: + type: string + enum: + - none + - annotator + created_unix: + type: integer + format: int64 + user: + $ref: '#/components/schemas/User' + example: + access_level: none + project_id: 1 + user_id: 5 + repo_id: 6 + created_unix: 2 + id: 0 + team_id: 5 + user: + full_name: full_name + avatar_url: avatar_url + id: 7 + login: login + username: username + GrantLabelStudioAccess: + required: + - project_id + type: object + properties: + project_id: + type: integer + description: "Project ID, -1 for wildcard access to all projects" + format: int64 + example: -1 + access_level: + type: string + description: Access level to grant + default: annotator + enum: + - annotator + - none + CreateAnnotatorTeam: + required: + - name + type: object + properties: + name: + type: string + description: Team name + example: Data Annotators + description: + type: string + description: Team description + example: Team for annotation work + team_type: + type: string + description: "Type of team - normal teams have repository access, annotator\ + \ teams only have annotation project access" + default: normal + enum: + - normal + - annotator + permission: + type: string + description: "Repository permission level (required for normal teams, ignored\ + \ for annotator teams)" + enum: + - read + - write + - admin WebhookConfig: required: - content_type @@ -2016,6 +2472,12 @@ components: username: type: string additionalProperties: false + example: + full_name: full_name + avatar_url: avatar_url + id: 7 + login: login + username: username State: type: string enum: @@ -2029,6 +2491,24 @@ components: description: "The permission to grant the collaborator. Can be one of **read**,\ \ **write** and **admin**." default: write + inline_response_200: + type: object + properties: + user_id: + type: integer + format: int64 + project_id: + type: integer + format: int64 + access_level: + type: string + enum: + - none + - annotator + example: + access_level: none + user_id: 0 + project_id: 6 repo_hooks_body: required: - config @@ -2188,10 +2668,18 @@ components: schema: type: integer default: 100 + Paging: + name: paging + in: query + description: Whether or not paging is enabled + schema: + type: boolean + default: false + example: false FromToken: name: from_token in: query - description: "Token, from which to continue iteration" + description: "[Only if paging is enabled] token, from which to continue iteration" schema: type: string Username: @@ -2246,6 +2734,31 @@ components: required: true schema: type: string + ProjectId: + name: project_id + in: query + description: "Label Studio project ID to filter by. If not specified, returns\ + \ access for all projects. Use -1 for wildcard access." + required: false + schema: + type: integer + format: int64 + UserId: + name: userid + in: path + description: User ID + required: true + schema: + type: integer + format: int64 + TeamId: + name: teamid + in: path + description: Team ID + required: true + schema: + type: integer + format: int64 Sha: name: sha in: path diff --git a/Go/api_annotations.go b/Go/api_annotations.go new file mode 100644 index 0000000..a2db9f6 --- /dev/null +++ b/Go/api_annotations.go @@ -0,0 +1,837 @@ + +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * API version: 1.0.3 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package dagshub_api + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "fmt" + "github.com/antihax/optional" +) + +// Linger please +var ( + _ context.Context +) + +type AnnotationsApiService service +/* +AnnotationsApiService Get team access level for annotation projects +Get the access level for a specific team and project (or all projects) + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @param optional nil or *AnnotationsApiGetLabelStudioTeamAccessOpts - Optional Parameters: + * @param "ProjectId" (optional.Int64) - Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +@return LabelStudioProjectAccess +*/ + +type AnnotationsApiGetLabelStudioTeamAccessOpts struct { + ProjectId optional.Int64 +} + +func (a *AnnotationsApiService) GetLabelStudioTeamAccess(ctx context.Context, owner string, repo string, teamid int64, localVarOptionals *AnnotationsApiGetLabelStudioTeamAccessOpts) (LabelStudioProjectAccess, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue LabelStudioProjectAccess + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamid"+"}", fmt.Sprintf("%v", teamid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.ProjectId.IsSet() { + localVarQueryParams.Add("project_id", parameterToString(localVarOptionals.ProjectId.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + + localVarQueryParams.Add("token", key) + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v LabelStudioProjectAccess + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +AnnotationsApiService Get user access level for annotation projects +Get the access level for a specific user and project (or all projects) + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @param optional nil or *AnnotationsApiGetLabelStudioUserAccessOpts - Optional Parameters: + * @param "ProjectId" (optional.Int64) - Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +@return InlineResponse200 +*/ + +type AnnotationsApiGetLabelStudioUserAccessOpts struct { + ProjectId optional.Int64 +} + +func (a *AnnotationsApiService) GetLabelStudioUserAccess(ctx context.Context, owner string, repo string, userid int64, localVarOptionals *AnnotationsApiGetLabelStudioUserAccessOpts) (InlineResponse200, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse200 + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/annotations/access/users/{userid}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userid"+"}", fmt.Sprintf("%v", userid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.ProjectId.IsSet() { + localVarQueryParams.Add("project_id", parameterToString(localVarOptionals.ProjectId.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + + localVarQueryParams.Add("token", key) + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v InlineResponse200 + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +AnnotationsApiService Grant team access to annotation projects +Grant a team access to specific Label Studio annotation projects (organization repositories only) + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + +*/ +func (a *AnnotationsApiService) GrantLabelStudioTeamAccess(ctx context.Context, body GrantLabelStudioAccess, owner string, repo string, teamid int64) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamid"+"}", fmt.Sprintf("%v", teamid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + + localVarQueryParams.Add("token", key) + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} +/* +AnnotationsApiService Grant user access to annotation projects +Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + +*/ +func (a *AnnotationsApiService) GrantLabelStudioUserAccess(ctx context.Context, body GrantLabelStudioAccess, owner string, repo string, userid int64) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Put") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/annotations/access/users/{userid}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userid"+"}", fmt.Sprintf("%v", userid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + + localVarQueryParams.Add("token", key) + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} +/* +AnnotationsApiService List team access entries for annotation projects +Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param owner owner of the repository + * @param repo name of the repository + * @param optional nil or *AnnotationsApiListLabelStudioTeamAccessOpts - Optional Parameters: + * @param "ProjectId" (optional.Int64) - Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +@return []LabelStudioProjectAccess +*/ + +type AnnotationsApiListLabelStudioTeamAccessOpts struct { + ProjectId optional.Int64 +} + +func (a *AnnotationsApiService) ListLabelStudioTeamAccess(ctx context.Context, owner string, repo string, localVarOptionals *AnnotationsApiListLabelStudioTeamAccessOpts) ([]LabelStudioProjectAccess, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []LabelStudioProjectAccess + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/annotations/access/teams" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.ProjectId.IsSet() { + localVarQueryParams.Add("project_id", parameterToString(localVarOptionals.ProjectId.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + + localVarQueryParams.Add("token", key) + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []LabelStudioProjectAccess + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +AnnotationsApiService List user access entries for annotation projects +Get a list of users with access to Label Studio annotation projects in the repository + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param owner owner of the repository + * @param repo name of the repository + * @param optional nil or *AnnotationsApiListLabelStudioUserAccessOpts - Optional Parameters: + * @param "ProjectId" (optional.Int64) - Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +@return []LabelStudioProjectAccess +*/ + +type AnnotationsApiListLabelStudioUserAccessOpts struct { + ProjectId optional.Int64 +} + +func (a *AnnotationsApiService) ListLabelStudioUserAccess(ctx context.Context, owner string, repo string, localVarOptionals *AnnotationsApiListLabelStudioUserAccessOpts) ([]LabelStudioProjectAccess, *http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Get") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + localVarReturnValue []LabelStudioProjectAccess + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/annotations/access/users" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.ProjectId.IsSet() { + localVarQueryParams.Add("project_id", parameterToString(localVarOptionals.ProjectId.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + + localVarQueryParams.Add("token", key) + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarReturnValue, localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHttpResponse, err + } + + if localVarHttpResponse.StatusCode < 300 { + // If we succeed, return the data, otherwise pass on to decode error. + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err == nil { + return localVarReturnValue, localVarHttpResponse, err + } + } + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + if localVarHttpResponse.StatusCode == 200 { + var v []LabelStudioProjectAccess + err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type")); + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHttpResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHttpResponse, newErr + } + return localVarReturnValue, localVarHttpResponse, newErr + } + + return localVarReturnValue, localVarHttpResponse, nil +} +/* +AnnotationsApiService Revoke team access to annotation projects +Revoke a team's access to Label Studio annotation projects + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @param optional nil or *AnnotationsApiRevokeLabelStudioTeamAccessOpts - Optional Parameters: + * @param "ProjectId" (optional.Int64) - Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + +*/ + +type AnnotationsApiRevokeLabelStudioTeamAccessOpts struct { + ProjectId optional.Int64 +} + +func (a *AnnotationsApiService) RevokeLabelStudioTeamAccess(ctx context.Context, owner string, repo string, teamid int64, localVarOptionals *AnnotationsApiRevokeLabelStudioTeamAccessOpts) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) + localVarPath = strings.Replace(localVarPath, "{"+"teamid"+"}", fmt.Sprintf("%v", teamid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.ProjectId.IsSet() { + localVarQueryParams.Add("project_id", parameterToString(localVarOptionals.ProjectId.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + + localVarQueryParams.Add("token", key) + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} +/* +AnnotationsApiService Revoke user access to annotation projects +Revoke a user's access to Label Studio annotation projects + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @param optional nil or *AnnotationsApiRevokeLabelStudioUserAccessOpts - Optional Parameters: + * @param "ProjectId" (optional.Int64) - Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + +*/ + +type AnnotationsApiRevokeLabelStudioUserAccessOpts struct { + ProjectId optional.Int64 +} + +func (a *AnnotationsApiService) RevokeLabelStudioUserAccess(ctx context.Context, owner string, repo string, userid int64, localVarOptionals *AnnotationsApiRevokeLabelStudioUserAccessOpts) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Delete") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/repos/{owner}/{repo}/annotations/access/users/{userid}" + localVarPath = strings.Replace(localVarPath, "{"+"owner"+"}", fmt.Sprintf("%v", owner), -1) + localVarPath = strings.Replace(localVarPath, "{"+"repo"+"}", fmt.Sprintf("%v", repo), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userid"+"}", fmt.Sprintf("%v", userid), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if localVarOptionals != nil && localVarOptionals.ProjectId.IsSet() { + localVarQueryParams.Add("project_id", parameterToString(localVarOptionals.ProjectId.Value(), "")) + } + // to determine the Content-Type header + localVarHttpContentTypes := []string{} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + + localVarQueryParams.Add("token", key) + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} diff --git a/Go/api_branches.go b/Go/api_branches.go index c5db693..3473be2 100644 --- a/Go/api_branches.go +++ b/Go/api_branches.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/api_collaborators.go b/Go/api_collaborators.go index 471cc20..b5d031b 100644 --- a/Go/api_collaborators.go +++ b/Go/api_collaborators.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/api_commits.go b/Go/api_commits.go index 2b12740..f152edd 100644 --- a/Go/api_commits.go +++ b/Go/api_commits.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/api_content.go b/Go/api_content.go index 54f76c1..c14c55b 100644 --- a/Go/api_content.go +++ b/Go/api_content.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/api_experiments.go b/Go/api_experiments.go index c49caf3..73abdfd 100644 --- a/Go/api_experiments.go +++ b/Go/api_experiments.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/api_issues.go b/Go/api_issues.go index a33bb9c..9641d85 100644 --- a/Go/api_issues.go +++ b/Go/api_issues.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/api_organizations.go b/Go/api_organizations.go new file mode 100644 index 0000000..59bd123 --- /dev/null +++ b/Go/api_organizations.go @@ -0,0 +1,110 @@ + +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * API version: 1.0.3 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package dagshub_api + +import ( + "context" + "io/ioutil" + "net/http" + "net/url" + "strings" + "fmt" +) + +// Linger please +var ( + _ context.Context +) + +type OrganizationsApiService service +/* +OrganizationsApiService Create an organization team +Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + * @param body + * @param orgname A DagsHub organization name + +*/ +func (a *OrganizationsApiService) CreateOrgTeam(ctx context.Context, body CreateAnnotatorTeam, orgname string) (*http.Response, error) { + var ( + localVarHttpMethod = strings.ToUpper("Post") + localVarPostBody interface{} + localVarFileName string + localVarFileBytes []byte + + ) + + // create path and map variables + localVarPath := a.client.cfg.BasePath + "/admin/orgs/{orgname}/teams" + localVarPath = strings.Replace(localVarPath, "{"+"orgname"+"}", fmt.Sprintf("%v", orgname), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHttpContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) + if localVarHttpContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHttpContentType + } + + // to determine the Accept header + localVarHttpHeaderAccepts := []string{} + + // set Accept header + localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) + if localVarHttpHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHttpHeaderAccept + } + // body params + localVarPostBody = &body + if ctx != nil { + // API Key Authentication + if auth, ok := ctx.Value(ContextAPIKey).(APIKey); ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + + localVarQueryParams.Add("token", key) + } + } + r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHttpResponse, err := a.client.callAPI(r) + if err != nil || localVarHttpResponse == nil { + return localVarHttpResponse, err + } + + localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) + localVarHttpResponse.Body.Close() + if err != nil { + return localVarHttpResponse, err + } + + + if localVarHttpResponse.StatusCode >= 300 { + newErr := GenericSwaggerError{ + body: localVarBody, + error: localVarHttpResponse.Status, + } + return localVarHttpResponse, newErr + } + + return localVarHttpResponse, nil +} diff --git a/Go/api_releases.go b/Go/api_releases.go index f0c97da..66f4285 100644 --- a/Go/api_releases.go +++ b/Go/api_releases.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/api_repository.go b/Go/api_repository.go index 6eaf5c5..b0be93d 100644 --- a/Go/api_repository.go +++ b/Go/api_repository.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/api_storage_integrations.go b/Go/api_storage_integrations.go index ce252c0..e411080 100644 --- a/Go/api_storage_integrations.go +++ b/Go/api_storage_integrations.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api @@ -36,13 +36,15 @@ StorageIntegrationsApiService List contents in the path * @param optional nil or *StorageIntegrationsApiGetBucketContentOpts - Optional Parameters: * @param "IncludeSize" (optional.Bool) - * @param "Limit" (optional.Int32) - Maximum amount of items to return - * @param "FromToken" (optional.String) - Token, from which to continue iteration + * @param "Paging" (optional.Bool) - Whether or not paging is enabled + * @param "FromToken" (optional.String) - [Only if paging is enabled] token, from which to continue iteration @return Files1 */ type StorageIntegrationsApiGetBucketContentOpts struct { IncludeSize optional.Bool Limit optional.Int32 + Paging optional.Bool FromToken optional.String } @@ -73,6 +75,9 @@ func (a *StorageIntegrationsApiService) GetBucketContent(ctx context.Context, ow if localVarOptionals != nil && localVarOptionals.Limit.IsSet() { localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), "")) } + if localVarOptionals != nil && localVarOptionals.Paging.IsSet() { + localVarQueryParams.Add("paging", parameterToString(localVarOptionals.Paging.Value(), "")) + } if localVarOptionals != nil && localVarOptionals.FromToken.IsSet() { localVarQueryParams.Add("from_token", parameterToString(localVarOptionals.FromToken.Value(), "")) } diff --git a/Go/api_user.go b/Go/api_user.go index d1e6409..02aef5a 100644 --- a/Go/api_user.go +++ b/Go/api_user.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/api_webhooks.go b/Go/api_webhooks.go index d23994b..3112583 100644 --- a/Go/api_webhooks.go +++ b/Go/api_webhooks.go @@ -4,7 +4,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/client.go b/Go/client.go index 1201885..a42dfe0 100644 --- a/Go/client.go +++ b/Go/client.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api @@ -36,7 +36,7 @@ var ( xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") ) -// APIClient manages communication with the DagsHub API API v1.0.2 +// APIClient manages communication with the DagsHub API API v1.0.3 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration @@ -44,6 +44,8 @@ type APIClient struct { // API Services + AnnotationsApi *AnnotationsApiService + BranchesApi *BranchesApiService CollaboratorsApi *CollaboratorsApiService @@ -56,6 +58,8 @@ type APIClient struct { IssuesApi *IssuesApiService + OrganizationsApi *OrganizationsApiService + ReleasesApi *ReleasesApiService RepositoryApi *RepositoryApiService @@ -83,12 +87,14 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services + c.AnnotationsApi = (*AnnotationsApiService)(&c.common) c.BranchesApi = (*BranchesApiService)(&c.common) c.CollaboratorsApi = (*CollaboratorsApiService)(&c.common) c.CommitsApi = (*CommitsApiService)(&c.common) c.ContentApi = (*ContentApiService)(&c.common) c.ExperimentsApi = (*ExperimentsApiService)(&c.common) c.IssuesApi = (*IssuesApiService)(&c.common) + c.OrganizationsApi = (*OrganizationsApiService)(&c.common) c.ReleasesApi = (*ReleasesApiService)(&c.common) c.RepositoryApi = (*RepositoryApiService)(&c.common) c.StorageIntegrationsApi = (*StorageIntegrationsApiService)(&c.common) diff --git a/Go/configuration.go b/Go/configuration.go index 948108f..7e3571a 100644 --- a/Go/configuration.go +++ b/Go/configuration.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/docs/AnnotationsApi.md b/Go/docs/AnnotationsApi.md new file mode 100644 index 0000000..5879ccf --- /dev/null +++ b/Go/docs/AnnotationsApi.md @@ -0,0 +1,313 @@ +# {{classname}} + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetLabelStudioTeamAccess**](AnnotationsApi.md#GetLabelStudioTeamAccess) | **Get** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +[**GetLabelStudioUserAccess**](AnnotationsApi.md#GetLabelStudioUserAccess) | **Get** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +[**GrantLabelStudioTeamAccess**](AnnotationsApi.md#GrantLabelStudioTeamAccess) | **Put** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +[**GrantLabelStudioUserAccess**](AnnotationsApi.md#GrantLabelStudioUserAccess) | **Put** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +[**ListLabelStudioTeamAccess**](AnnotationsApi.md#ListLabelStudioTeamAccess) | **Get** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +[**ListLabelStudioUserAccess**](AnnotationsApi.md#ListLabelStudioUserAccess) | **Get** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +[**RevokeLabelStudioTeamAccess**](AnnotationsApi.md#RevokeLabelStudioTeamAccess) | **Delete** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +[**RevokeLabelStudioUserAccess**](AnnotationsApi.md#RevokeLabelStudioUserAccess) | **Delete** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects + +# **GetLabelStudioTeamAccess** +> LabelStudioProjectAccess GetLabelStudioTeamAccess(ctx, owner, repo, teamid, optional) +Get team access level for annotation projects + +Get the access level for a specific team and project (or all projects) + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **teamid** | **int64**| Team ID | + **optional** | ***AnnotationsApiGetLabelStudioTeamAccessOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a AnnotationsApiGetLabelStudioTeamAccessOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **projectId** | **optional.Int64**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | + +### Return type + +[**LabelStudioProjectAccess**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GetLabelStudioUserAccess** +> InlineResponse200 GetLabelStudioUserAccess(ctx, owner, repo, userid, optional) +Get user access level for annotation projects + +Get the access level for a specific user and project (or all projects) + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **userid** | **int64**| User ID | + **optional** | ***AnnotationsApiGetLabelStudioUserAccessOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a AnnotationsApiGetLabelStudioUserAccessOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **projectId** | **optional.Int64**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | + +### Return type + +[**InlineResponse200**](inline_response_200.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GrantLabelStudioTeamAccess** +> GrantLabelStudioTeamAccess(ctx, body, owner, repo, teamid) +Grant team access to annotation projects + +Grant a team access to specific Label Studio annotation projects (organization repositories only) + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **teamid** | **int64**| Team ID | + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **GrantLabelStudioUserAccess** +> GrantLabelStudioUserAccess(ctx, body, owner, repo, userid) +Grant user access to annotation projects + +Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **userid** | **int64**| User ID | + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListLabelStudioTeamAccess** +> []LabelStudioProjectAccess ListLabelStudioTeamAccess(ctx, owner, repo, optional) +List team access entries for annotation projects + +Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **optional** | ***AnnotationsApiListLabelStudioTeamAccessOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a AnnotationsApiListLabelStudioTeamAccessOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **projectId** | **optional.Int64**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | + +### Return type + +[**[]LabelStudioProjectAccess**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **ListLabelStudioUserAccess** +> []LabelStudioProjectAccess ListLabelStudioUserAccess(ctx, owner, repo, optional) +List user access entries for annotation projects + +Get a list of users with access to Label Studio annotation projects in the repository + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **optional** | ***AnnotationsApiListLabelStudioUserAccessOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a AnnotationsApiListLabelStudioUserAccessOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **projectId** | **optional.Int64**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | + +### Return type + +[**[]LabelStudioProjectAccess**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RevokeLabelStudioTeamAccess** +> RevokeLabelStudioTeamAccess(ctx, owner, repo, teamid, optional) +Revoke team access to annotation projects + +Revoke a team's access to Label Studio annotation projects + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **teamid** | **int64**| Team ID | + **optional** | ***AnnotationsApiRevokeLabelStudioTeamAccessOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a AnnotationsApiRevokeLabelStudioTeamAccessOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **projectId** | **optional.Int64**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **RevokeLabelStudioUserAccess** +> RevokeLabelStudioUserAccess(ctx, owner, repo, userid, optional) +Revoke user access to annotation projects + +Revoke a user's access to Label Studio annotation projects + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **owner** | **string**| owner of the repository | + **repo** | **string**| name of the repository | + **userid** | **int64**| User ID | + **optional** | ***AnnotationsApiRevokeLabelStudioUserAccessOpts** | optional parameters | nil if no parameters + +### Optional Parameters +Optional parameters are passed through a pointer to a AnnotationsApiRevokeLabelStudioUserAccessOpts struct +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **projectId** | **optional.Int64**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/Go/docs/CreateAnnotatorTeam.md b/Go/docs/CreateAnnotatorTeam.md new file mode 100644 index 0000000..ce0968e --- /dev/null +++ b/Go/docs/CreateAnnotatorTeam.md @@ -0,0 +1,12 @@ +# CreateAnnotatorTeam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Team name | [default to null] +**Description** | **string** | Team description | [optional] [default to null] +**TeamType** | **string** | Type of team - normal teams have repository access, annotator teams only have annotation project access | [optional] [default to TEAM_TYPE.NORMAL] +**Permission** | **string** | Repository permission level (required for normal teams, ignored for annotator teams) | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/Go/docs/Files1.md b/Go/docs/Files1.md index c590dba..54fa7f7 100644 --- a/Go/docs/Files1.md +++ b/Go/docs/Files1.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Entries** | [**[]*os.File**](*os.File.md) | | [optional] [default to null] -**Limit** | **int32** | | [optional] [default to null] -**NextToken** | **string** | | [optional] [default to null] +**NextToken** | **string** | Next token to continue pagination from | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Go/docs/GrantLabelStudioAccess.md b/Go/docs/GrantLabelStudioAccess.md new file mode 100644 index 0000000..92dbed9 --- /dev/null +++ b/Go/docs/GrantLabelStudioAccess.md @@ -0,0 +1,10 @@ +# GrantLabelStudioAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ProjectId** | **int64** | Project ID, -1 for wildcard access to all projects | [default to null] +**AccessLevel** | **string** | Access level to grant | [optional] [default to ACCESS_LEVEL.ANNOTATOR] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/Go/docs/InlineResponse200.md b/Go/docs/InlineResponse200.md new file mode 100644 index 0000000..d9fb0a7 --- /dev/null +++ b/Go/docs/InlineResponse200.md @@ -0,0 +1,11 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserId** | **int64** | | [optional] [default to null] +**ProjectId** | **int64** | | [optional] [default to null] +**AccessLevel** | **string** | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/Go/docs/LabelStudioProjectAccess.md b/Go/docs/LabelStudioProjectAccess.md new file mode 100644 index 0000000..30b8735 --- /dev/null +++ b/Go/docs/LabelStudioProjectAccess.md @@ -0,0 +1,16 @@ +# LabelStudioProjectAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | [optional] [default to null] +**RepoId** | **int64** | | [optional] [default to null] +**ProjectId** | **int64** | Project ID, -1 means wildcard access to all projects | [optional] [default to null] +**UserId** | **int64** | User ID (present for user access entries) | [optional] [default to null] +**TeamId** | **int64** | Team ID (present for team access entries) | [optional] [default to null] +**AccessLevel** | **string** | | [optional] [default to null] +**CreatedUnix** | **int64** | | [optional] [default to null] +**User** | [***User**](User.md) | | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/Go/docs/OrganizationsApi.md b/Go/docs/OrganizationsApi.md new file mode 100644 index 0000000..f72219f --- /dev/null +++ b/Go/docs/OrganizationsApi.md @@ -0,0 +1,37 @@ +# {{classname}} + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateOrgTeam**](OrganizationsApi.md#CreateOrgTeam) | **Post** /admin/orgs/{orgname}/teams | Create an organization team + +# **CreateOrgTeam** +> CreateOrgTeam(ctx, body, orgname) +Create an organization team + +Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + +### Required Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. + **body** | [**CreateAnnotatorTeam**](CreateAnnotatorTeam.md)| | + **orgname** | **string**| A DagsHub organization name | + +### Return type + + (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/Go/docs/StorageIntegrationsApi.md b/Go/docs/StorageIntegrationsApi.md index 370d5a7..a840b22 100644 --- a/Go/docs/StorageIntegrationsApi.md +++ b/Go/docs/StorageIntegrationsApi.md @@ -35,7 +35,8 @@ Name | Type | Description | Notes **includeSize** | **optional.Bool**| | [default to false] **limit** | **optional.Int32**| Maximum amount of items to return | [default to 100] - **fromToken** | **optional.String**| Token, from which to continue iteration | + **paging** | **optional.Bool**| Whether or not paging is enabled | [default to false] + **fromToken** | **optional.String**| [Only if paging is enabled] token, from which to continue iteration | ### Return type diff --git a/Go/model_collaborators_collaborator_body.go b/Go/model_collaborators_collaborator_body.go index 1844314..fdd6620 100644 --- a/Go/model_collaborators_collaborator_body.go +++ b/Go/model_collaborators_collaborator_body.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_create_annotator_team.go b/Go/model_create_annotator_team.go new file mode 100644 index 0000000..41513ac --- /dev/null +++ b/Go/model_create_annotator_team.go @@ -0,0 +1,20 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * API version: 1.0.3 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package dagshub_api + +type CreateAnnotatorTeam struct { + // Team name + Name string `json:"name"` + // Team description + Description string `json:"description,omitempty"` + // Type of team - normal teams have repository access, annotator teams only have annotation project access + TeamType string `json:"team_type,omitempty"` + // Repository permission level (required for normal teams, ignored for annotator teams) + Permission string `json:"permission,omitempty"` +} diff --git a/Go/model_create_repo.go b/Go/model_create_repo.go index a877c07..1fb214f 100644 --- a/Go/model_create_repo.go +++ b/Go/model_create_repo.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_edit_experiment_post.go b/Go/model_edit_experiment_post.go index 3ec7a86..6b1235a 100644 --- a/Go/model_edit_experiment_post.go +++ b/Go/model_edit_experiment_post.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_experiment_keys.go b/Go/model_experiment_keys.go index d7c92ff..ebb71d2 100644 --- a/Go/model_experiment_keys.go +++ b/Go/model_experiment_keys.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_file.go b/Go/model_file.go index f6e83bf..244602a 100644 --- a/Go/model_file.go +++ b/Go/model_file.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_files_1.go b/Go/model_files_1.go index 598508e..3c397cc 100644 --- a/Go/model_files_1.go +++ b/Go/model_files_1.go @@ -3,13 +3,13 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api type Files1 struct { Entries []*os.File `json:"entries,omitempty"` - Limit int32 `json:"limit,omitempty"` + // Next token to continue pagination from NextToken string `json:"next_token,omitempty"` } diff --git a/Go/model_grant_label_studio_access.go b/Go/model_grant_label_studio_access.go new file mode 100644 index 0000000..fba6cbb --- /dev/null +++ b/Go/model_grant_label_studio_access.go @@ -0,0 +1,16 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * API version: 1.0.3 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package dagshub_api + +type GrantLabelStudioAccess struct { + // Project ID, -1 for wildcard access to all projects + ProjectId int64 `json:"project_id"` + // Access level to grant + AccessLevel string `json:"access_level,omitempty"` +} diff --git a/Go/model_hooks_id_body.go b/Go/model_hooks_id_body.go index 1c04ff9..9852953 100644 --- a/Go/model_hooks_id_body.go +++ b/Go/model_hooks_id_body.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_inline_response_200.go b/Go/model_inline_response_200.go new file mode 100644 index 0000000..e65d540 --- /dev/null +++ b/Go/model_inline_response_200.go @@ -0,0 +1,15 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * API version: 1.0.3 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package dagshub_api + +type InlineResponse200 struct { + UserId int64 `json:"user_id,omitempty"` + ProjectId int64 `json:"project_id,omitempty"` + AccessLevel string `json:"access_level,omitempty"` +} diff --git a/Go/model_integration_inner.go b/Go/model_integration_inner.go index 83d2699..b47dd3b 100644 --- a/Go/model_integration_inner.go +++ b/Go/model_integration_inner.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_issue.go b/Go/model_issue.go index 4384eda..255a289 100644 --- a/Go/model_issue.go +++ b/Go/model_issue.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_issue_assignee.go b/Go/model_issue_assignee.go index 9374305..8e8f396 100644 --- a/Go/model_issue_assignee.go +++ b/Go/model_issue_assignee.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_issue_labels.go b/Go/model_issue_labels.go index 62f4311..2718260 100644 --- a/Go/model_issue_labels.go +++ b/Go/model_issue_labels.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_issue_milestone.go b/Go/model_issue_milestone.go index fad0165..fac7286 100644 --- a/Go/model_issue_milestone.go +++ b/Go/model_issue_milestone.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_label_studio_project_access.go b/Go/model_label_studio_project_access.go new file mode 100644 index 0000000..8795643 --- /dev/null +++ b/Go/model_label_studio_project_access.go @@ -0,0 +1,23 @@ +/* + * DagsHub API + * + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * API version: 1.0.3 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ +package dagshub_api + +type LabelStudioProjectAccess struct { + Id int64 `json:"id,omitempty"` + RepoId int64 `json:"repo_id,omitempty"` + // Project ID, -1 means wildcard access to all projects + ProjectId int64 `json:"project_id,omitempty"` + // User ID (present for user access entries) + UserId int64 `json:"user_id,omitempty"` + // Team ID (present for team access entries) + TeamId int64 `json:"team_id,omitempty"` + AccessLevel string `json:"access_level,omitempty"` + CreatedUnix int64 `json:"created_unix,omitempty"` + User *User `json:"user,omitempty"` +} diff --git a/Go/model_migrate_repo.go b/Go/model_migrate_repo.go index 9afbd78..824d516 100644 --- a/Go/model_migrate_repo.go +++ b/Go/model_migrate_repo.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_patch_issue.go b/Go/model_patch_issue.go index 672d4f9..79c6bb6 100644 --- a/Go/model_patch_issue.go +++ b/Go/model_patch_issue.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_post_issue.go b/Go/model_post_issue.go index 481dfe9..1a0c87d 100644 --- a/Go/model_post_issue.go +++ b/Go/model_post_issue.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_put_file.go b/Go/model_put_file.go index 2706dcd..238bb8c 100644 --- a/Go/model_put_file.go +++ b/Go/model_put_file.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_repo_hooks_body.go b/Go/model_repo_hooks_body.go index 08b5c81..6dd4d00 100644 --- a/Go/model_repo_hooks_body.go +++ b/Go/model_repo_hooks_body.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_state.go b/Go/model_state.go index 969252f..7bc9da9 100644 --- a/Go/model_state.go +++ b/Go/model_state.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_user.go b/Go/model_user.go index adfdf6a..ab3930f 100644 --- a/Go/model_user.go +++ b/Go/model_user.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/model_webhook_config.go b/Go/model_webhook_config.go index 9509716..01476b0 100644 --- a/Go/model_webhook_config.go +++ b/Go/model_webhook_config.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Go/response.go b/Go/response.go index 6a8068b..f303c52 100644 --- a/Go/response.go +++ b/Go/response.go @@ -3,7 +3,7 @@ * * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * API version: 1.0.2 + * API version: 1.0.3 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) */ package dagshub_api diff --git a/Java/README.md b/Java/README.md index 8a49b31..ba3ca77 100644 --- a/Java/README.md +++ b/Java/README.md @@ -1,8 +1,8 @@ # swagger-java-client DagsHub API -- API version: 1.0.2 - - Build date: 2023-05-11T11:41:48.085831Z[Etc/UTC] +- API version: 1.0.3 + - Build date: 2026-01-28T08:00:41.951499729Z[Etc/UTC] This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. @@ -74,12 +74,12 @@ Please follow the [installation](#installation) instruction and execute the foll import io.swagger.client.*; import io.swagger.client.auth.*; import io.swagger.client.model.*; -import io.swagger.client.api.BranchesApi; +import io.swagger.client.api.AnnotationsApi; import java.io.File; import java.util.*; -public class BranchesApiExample { +public class AnnotationsApiExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); @@ -94,14 +94,16 @@ public class BranchesApiExample { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //tokenAuth.setApiKeyPrefix("Token"); - BranchesApi apiInstance = new BranchesApi(); + AnnotationsApi apiInstance = new AnnotationsApi(); String owner = "owner_example"; // String | owner of the repository String repo = "repo_example"; // String | name of the repository - String branch = "branch_example"; // String | branch of the repository + Long teamid = 789L; // Long | Team ID + Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. try { - apiInstance.getBranch(owner, repo, branch); + LabelStudioProjectAccess result = apiInstance.getLabelStudioTeamAccess(owner, repo, teamid, projectId); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling BranchesApi#getBranch"); + System.err.println("Exception when calling AnnotationsApi#getLabelStudioTeamAccess"); e.printStackTrace(); } } @@ -109,12 +111,12 @@ public class BranchesApiExample { import io.swagger.client.*; import io.swagger.client.auth.*; import io.swagger.client.model.*; -import io.swagger.client.api.BranchesApi; +import io.swagger.client.api.AnnotationsApi; import java.io.File; import java.util.*; -public class BranchesApiExample { +public class AnnotationsApiExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); @@ -129,13 +131,232 @@ public class BranchesApiExample { // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //tokenAuth.setApiKeyPrefix("Token"); - BranchesApi apiInstance = new BranchesApi(); + AnnotationsApi apiInstance = new AnnotationsApi(); String owner = "owner_example"; // String | owner of the repository String repo = "repo_example"; // String | name of the repository + Long userid = 789L; // Long | User ID + Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. try { - apiInstance.listBranches(owner, repo); + InlineResponse200 result = apiInstance.getLabelStudioUserAccess(owner, repo, userid, projectId); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling BranchesApi#listBranches"); + System.err.println("Exception when calling AnnotationsApi#getLabelStudioUserAccess"); + e.printStackTrace(); + } + } +} +import io.swagger.client.*; +import io.swagger.client.auth.*; +import io.swagger.client.model.*; +import io.swagger.client.api.AnnotationsApi; + +import java.io.File; +import java.util.*; + +public class AnnotationsApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure HTTP basic authorization: basicAuth + HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); + basicAuth.setUsername("YOUR USERNAME"); + basicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: tokenAuth + ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); + tokenAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //tokenAuth.setApiKeyPrefix("Token"); + + AnnotationsApi apiInstance = new AnnotationsApi(); + GrantLabelStudioAccess body = new GrantLabelStudioAccess(); // GrantLabelStudioAccess | + String owner = "owner_example"; // String | owner of the repository + String repo = "repo_example"; // String | name of the repository + Long teamid = 789L; // Long | Team ID + try { + apiInstance.grantLabelStudioTeamAccess(body, owner, repo, teamid); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#grantLabelStudioTeamAccess"); + e.printStackTrace(); + } + } +} +import io.swagger.client.*; +import io.swagger.client.auth.*; +import io.swagger.client.model.*; +import io.swagger.client.api.AnnotationsApi; + +import java.io.File; +import java.util.*; + +public class AnnotationsApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure HTTP basic authorization: basicAuth + HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); + basicAuth.setUsername("YOUR USERNAME"); + basicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: tokenAuth + ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); + tokenAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //tokenAuth.setApiKeyPrefix("Token"); + + AnnotationsApi apiInstance = new AnnotationsApi(); + GrantLabelStudioAccess body = new GrantLabelStudioAccess(); // GrantLabelStudioAccess | + String owner = "owner_example"; // String | owner of the repository + String repo = "repo_example"; // String | name of the repository + Long userid = 789L; // Long | User ID + try { + apiInstance.grantLabelStudioUserAccess(body, owner, repo, userid); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#grantLabelStudioUserAccess"); + e.printStackTrace(); + } + } +} +import io.swagger.client.*; +import io.swagger.client.auth.*; +import io.swagger.client.model.*; +import io.swagger.client.api.AnnotationsApi; + +import java.io.File; +import java.util.*; + +public class AnnotationsApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure HTTP basic authorization: basicAuth + HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); + basicAuth.setUsername("YOUR USERNAME"); + basicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: tokenAuth + ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); + tokenAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //tokenAuth.setApiKeyPrefix("Token"); + + AnnotationsApi apiInstance = new AnnotationsApi(); + String owner = "owner_example"; // String | owner of the repository + String repo = "repo_example"; // String | name of the repository + Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + try { + List result = apiInstance.listLabelStudioTeamAccess(owner, repo, projectId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#listLabelStudioTeamAccess"); + e.printStackTrace(); + } + } +} +import io.swagger.client.*; +import io.swagger.client.auth.*; +import io.swagger.client.model.*; +import io.swagger.client.api.AnnotationsApi; + +import java.io.File; +import java.util.*; + +public class AnnotationsApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure HTTP basic authorization: basicAuth + HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); + basicAuth.setUsername("YOUR USERNAME"); + basicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: tokenAuth + ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); + tokenAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //tokenAuth.setApiKeyPrefix("Token"); + + AnnotationsApi apiInstance = new AnnotationsApi(); + String owner = "owner_example"; // String | owner of the repository + String repo = "repo_example"; // String | name of the repository + Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + try { + List result = apiInstance.listLabelStudioUserAccess(owner, repo, projectId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#listLabelStudioUserAccess"); + e.printStackTrace(); + } + } +} +import io.swagger.client.*; +import io.swagger.client.auth.*; +import io.swagger.client.model.*; +import io.swagger.client.api.AnnotationsApi; + +import java.io.File; +import java.util.*; + +public class AnnotationsApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure HTTP basic authorization: basicAuth + HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); + basicAuth.setUsername("YOUR USERNAME"); + basicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: tokenAuth + ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); + tokenAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //tokenAuth.setApiKeyPrefix("Token"); + + AnnotationsApi apiInstance = new AnnotationsApi(); + String owner = "owner_example"; // String | owner of the repository + String repo = "repo_example"; // String | name of the repository + Long teamid = 789L; // Long | Team ID + Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + try { + apiInstance.revokeLabelStudioTeamAccess(owner, repo, teamid, projectId); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#revokeLabelStudioTeamAccess"); + e.printStackTrace(); + } + } +} +import io.swagger.client.*; +import io.swagger.client.auth.*; +import io.swagger.client.model.*; +import io.swagger.client.api.AnnotationsApi; + +import java.io.File; +import java.util.*; + +public class AnnotationsApiExample { + + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + // Configure HTTP basic authorization: basicAuth + HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); + basicAuth.setUsername("YOUR USERNAME"); + basicAuth.setPassword("YOUR PASSWORD"); + + // Configure API key authorization: tokenAuth + ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); + tokenAuth.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //tokenAuth.setApiKeyPrefix("Token"); + + AnnotationsApi apiInstance = new AnnotationsApi(); + String owner = "owner_example"; // String | owner of the repository + String repo = "repo_example"; // String | name of the repository + Long userid = 789L; // Long | User ID + Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + try { + apiInstance.revokeLabelStudioUserAccess(owner, repo, userid, projectId); + } catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#revokeLabelStudioUserAccess"); e.printStackTrace(); } } @@ -148,6 +369,14 @@ All URIs are relative to *https://dagshub.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AnnotationsApi* | [**getLabelStudioTeamAccess**](docs/AnnotationsApi.md#getLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +*AnnotationsApi* | [**getLabelStudioUserAccess**](docs/AnnotationsApi.md#getLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +*AnnotationsApi* | [**grantLabelStudioTeamAccess**](docs/AnnotationsApi.md#grantLabelStudioTeamAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +*AnnotationsApi* | [**grantLabelStudioUserAccess**](docs/AnnotationsApi.md#grantLabelStudioUserAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +*AnnotationsApi* | [**listLabelStudioTeamAccess**](docs/AnnotationsApi.md#listLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +*AnnotationsApi* | [**listLabelStudioUserAccess**](docs/AnnotationsApi.md#listLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +*AnnotationsApi* | [**revokeLabelStudioTeamAccess**](docs/AnnotationsApi.md#revokeLabelStudioTeamAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +*AnnotationsApi* | [**revokeLabelStudioUserAccess**](docs/AnnotationsApi.md#revokeLabelStudioUserAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects *BranchesApi* | [**getBranch**](docs/BranchesApi.md#getBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch *BranchesApi* | [**listBranches**](docs/BranchesApi.md#listBranches) | **GET** /repos/{owner}/{repo}/branches | List Branches *CollaboratorsApi* | [**addCollaborator**](docs/CollaboratorsApi.md#addCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator @@ -168,6 +397,7 @@ Class | Method | HTTP request | Description *IssuesApi* | [**editIssue**](docs/IssuesApi.md#editIssue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue *IssuesApi* | [**getIssue**](docs/IssuesApi.md#getIssue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue *IssuesApi* | [**listRepoIssues**](docs/IssuesApi.md#listRepoIssues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository +*OrganizationsApi* | [**createOrgTeam**](docs/OrganizationsApi.md#createOrgTeam) | **POST** /admin/orgs/{orgname}/teams | Create an organization team *ReleasesApi* | [**listReleases**](docs/ReleasesApi.md#listReleases) | **GET** /repos/{owner}/{repo}/releases | List Releases *RepositoryApi* | [**createOrgRepo**](docs/RepositoryApi.md#createOrgRepo) | **POST** /org/{orgname}/repos | Create in organization *RepositoryApi* | [**createRepo**](docs/RepositoryApi.md#createRepo) | **POST** /user/repos | Create @@ -190,13 +420,16 @@ Class | Method | HTTP request | Description ## Documentation for Models - [CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) + - [CreateAnnotatorTeam](docs/CreateAnnotatorTeam.md) - [CreateRepo](docs/CreateRepo.md) - [EditExperimentPost](docs/EditExperimentPost.md) - [ExperimentKeys](docs/ExperimentKeys.md) - [File](docs/File.md) - [Files](docs/Files.md) - [Files1](docs/Files1.md) + - [GrantLabelStudioAccess](docs/GrantLabelStudioAccess.md) - [HooksIdBody](docs/HooksIdBody.md) + - [InlineResponse200](docs/InlineResponse200.md) - [Integration](docs/Integration.md) - [IntegrationInner](docs/IntegrationInner.md) - [Issue](docs/Issue.md) @@ -204,6 +437,7 @@ Class | Method | HTTP request | Description - [IssueLabels](docs/IssueLabels.md) - [IssueMilestone](docs/IssueMilestone.md) - [Issues](docs/Issues.md) + - [LabelStudioProjectAccess](docs/LabelStudioProjectAccess.md) - [Labels](docs/Labels.md) - [MigrateRepo](docs/MigrateRepo.md) - [PatchIssue](docs/PatchIssue.md) diff --git a/Java/docs/AnnotationsApi.md b/Java/docs/AnnotationsApi.md new file mode 100644 index 0000000..9d980aa --- /dev/null +++ b/Java/docs/AnnotationsApi.md @@ -0,0 +1,527 @@ +# AnnotationsApi + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getLabelStudioTeamAccess**](AnnotationsApi.md#getLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +[**getLabelStudioUserAccess**](AnnotationsApi.md#getLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +[**grantLabelStudioTeamAccess**](AnnotationsApi.md#grantLabelStudioTeamAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +[**grantLabelStudioUserAccess**](AnnotationsApi.md#grantLabelStudioUserAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +[**listLabelStudioTeamAccess**](AnnotationsApi.md#listLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +[**listLabelStudioUserAccess**](AnnotationsApi.md#listLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +[**revokeLabelStudioTeamAccess**](AnnotationsApi.md#revokeLabelStudioTeamAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +[**revokeLabelStudioUserAccess**](AnnotationsApi.md#revokeLabelStudioUserAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects + + +# **getLabelStudioTeamAccess** +> LabelStudioProjectAccess getLabelStudioTeamAccess(owner, repo, teamid, projectId) + +Get team access level for annotation projects + +Get the access level for a specific team and project (or all projects) + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.AnnotationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); +// Configure HTTP basic authorization: basicAuth +HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); +basicAuth.setUsername("YOUR USERNAME"); +basicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: tokenAuth +ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); +tokenAuth.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.setApiKeyPrefix("Token"); + +AnnotationsApi apiInstance = new AnnotationsApi(); +String owner = "owner_example"; // String | owner of the repository +String repo = "repo_example"; // String | name of the repository +Long teamid = 789L; // Long | Team ID +Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + LabelStudioProjectAccess result = apiInstance.getLabelStudioTeamAccess(owner, repo, teamid, projectId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#getLabelStudioTeamAccess"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **teamid** | **Long**| Team ID | + **projectId** | **Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**LabelStudioProjectAccess**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getLabelStudioUserAccess** +> InlineResponse200 getLabelStudioUserAccess(owner, repo, userid, projectId) + +Get user access level for annotation projects + +Get the access level for a specific user and project (or all projects) + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.AnnotationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); +// Configure HTTP basic authorization: basicAuth +HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); +basicAuth.setUsername("YOUR USERNAME"); +basicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: tokenAuth +ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); +tokenAuth.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.setApiKeyPrefix("Token"); + +AnnotationsApi apiInstance = new AnnotationsApi(); +String owner = "owner_example"; // String | owner of the repository +String repo = "repo_example"; // String | name of the repository +Long userid = 789L; // Long | User ID +Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + InlineResponse200 result = apiInstance.getLabelStudioUserAccess(owner, repo, userid, projectId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#getLabelStudioUserAccess"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **userid** | **Long**| User ID | + **projectId** | **Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **grantLabelStudioTeamAccess** +> grantLabelStudioTeamAccess(body, owner, repo, teamid) + +Grant team access to annotation projects + +Grant a team access to specific Label Studio annotation projects (organization repositories only) + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.AnnotationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); +// Configure HTTP basic authorization: basicAuth +HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); +basicAuth.setUsername("YOUR USERNAME"); +basicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: tokenAuth +ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); +tokenAuth.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.setApiKeyPrefix("Token"); + +AnnotationsApi apiInstance = new AnnotationsApi(); +GrantLabelStudioAccess body = new GrantLabelStudioAccess(); // GrantLabelStudioAccess | +String owner = "owner_example"; // String | owner of the repository +String repo = "repo_example"; // String | name of the repository +Long teamid = 789L; // Long | Team ID +try { + apiInstance.grantLabelStudioTeamAccess(body, owner, repo, teamid); +} catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#grantLabelStudioTeamAccess"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **teamid** | **Long**| Team ID | + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **grantLabelStudioUserAccess** +> grantLabelStudioUserAccess(body, owner, repo, userid) + +Grant user access to annotation projects + +Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.AnnotationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); +// Configure HTTP basic authorization: basicAuth +HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); +basicAuth.setUsername("YOUR USERNAME"); +basicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: tokenAuth +ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); +tokenAuth.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.setApiKeyPrefix("Token"); + +AnnotationsApi apiInstance = new AnnotationsApi(); +GrantLabelStudioAccess body = new GrantLabelStudioAccess(); // GrantLabelStudioAccess | +String owner = "owner_example"; // String | owner of the repository +String repo = "repo_example"; // String | name of the repository +Long userid = 789L; // Long | User ID +try { + apiInstance.grantLabelStudioUserAccess(body, owner, repo, userid); +} catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#grantLabelStudioUserAccess"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **userid** | **Long**| User ID | + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **listLabelStudioTeamAccess** +> List<LabelStudioProjectAccess> listLabelStudioTeamAccess(owner, repo, projectId) + +List team access entries for annotation projects + +Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.AnnotationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); +// Configure HTTP basic authorization: basicAuth +HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); +basicAuth.setUsername("YOUR USERNAME"); +basicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: tokenAuth +ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); +tokenAuth.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.setApiKeyPrefix("Token"); + +AnnotationsApi apiInstance = new AnnotationsApi(); +String owner = "owner_example"; // String | owner of the repository +String repo = "repo_example"; // String | name of the repository +Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + List result = apiInstance.listLabelStudioTeamAccess(owner, repo, projectId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#listLabelStudioTeamAccess"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **projectId** | **Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**List<LabelStudioProjectAccess>**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **listLabelStudioUserAccess** +> List<LabelStudioProjectAccess> listLabelStudioUserAccess(owner, repo, projectId) + +List user access entries for annotation projects + +Get a list of users with access to Label Studio annotation projects in the repository + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.AnnotationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); +// Configure HTTP basic authorization: basicAuth +HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); +basicAuth.setUsername("YOUR USERNAME"); +basicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: tokenAuth +ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); +tokenAuth.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.setApiKeyPrefix("Token"); + +AnnotationsApi apiInstance = new AnnotationsApi(); +String owner = "owner_example"; // String | owner of the repository +String repo = "repo_example"; // String | name of the repository +Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + List result = apiInstance.listLabelStudioUserAccess(owner, repo, projectId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#listLabelStudioUserAccess"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **projectId** | **Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**List<LabelStudioProjectAccess>**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **revokeLabelStudioTeamAccess** +> revokeLabelStudioTeamAccess(owner, repo, teamid, projectId) + +Revoke team access to annotation projects + +Revoke a team's access to Label Studio annotation projects + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.AnnotationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); +// Configure HTTP basic authorization: basicAuth +HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); +basicAuth.setUsername("YOUR USERNAME"); +basicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: tokenAuth +ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); +tokenAuth.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.setApiKeyPrefix("Token"); + +AnnotationsApi apiInstance = new AnnotationsApi(); +String owner = "owner_example"; // String | owner of the repository +String repo = "repo_example"; // String | name of the repository +Long teamid = 789L; // Long | Team ID +Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + apiInstance.revokeLabelStudioTeamAccess(owner, repo, teamid, projectId); +} catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#revokeLabelStudioTeamAccess"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **teamid** | **Long**| Team ID | + **projectId** | **Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **revokeLabelStudioUserAccess** +> revokeLabelStudioUserAccess(owner, repo, userid, projectId) + +Revoke user access to annotation projects + +Revoke a user's access to Label Studio annotation projects + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.AnnotationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); +// Configure HTTP basic authorization: basicAuth +HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); +basicAuth.setUsername("YOUR USERNAME"); +basicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: tokenAuth +ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); +tokenAuth.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.setApiKeyPrefix("Token"); + +AnnotationsApi apiInstance = new AnnotationsApi(); +String owner = "owner_example"; // String | owner of the repository +String repo = "repo_example"; // String | name of the repository +Long userid = 789L; // Long | User ID +Long projectId = 789L; // Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + apiInstance.revokeLabelStudioUserAccess(owner, repo, userid, projectId); +} catch (ApiException e) { + System.err.println("Exception when calling AnnotationsApi#revokeLabelStudioUserAccess"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **userid** | **Long**| User ID | + **projectId** | **Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + diff --git a/Java/docs/CreateAnnotatorTeam.md b/Java/docs/CreateAnnotatorTeam.md new file mode 100644 index 0000000..0ccbc3d --- /dev/null +++ b/Java/docs/CreateAnnotatorTeam.md @@ -0,0 +1,24 @@ +# CreateAnnotatorTeam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Team name | +**description** | **String** | Team description | [optional] +**teamType** | [**TeamTypeEnum**](#TeamTypeEnum) | Type of team - normal teams have repository access, annotator teams only have annotation project access | [optional] +**permission** | [**PermissionEnum**](#PermissionEnum) | Repository permission level (required for normal teams, ignored for annotator teams) | [optional] + + +## Enum: TeamTypeEnum +Name | Value +---- | ----- +NORMAL | "normal" +ANNOTATOR | "annotator" + + +## Enum: PermissionEnum +Name | Value +---- | ----- +READ | "read" +WRITE | "write" +ADMIN | "admin" diff --git a/Java/docs/Files1.md b/Java/docs/Files1.md index 82b3ff3..d18bb10 100644 --- a/Java/docs/Files1.md +++ b/Java/docs/Files1.md @@ -4,5 +4,4 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **entries** | [**List<File>**](File.md) | | [optional] -**limit** | **Integer** | | [optional] -**nextToken** | **String** | | [optional] +**nextToken** | **String** | Next token to continue pagination from | [optional] diff --git a/Java/docs/GrantLabelStudioAccess.md b/Java/docs/GrantLabelStudioAccess.md new file mode 100644 index 0000000..7877e1b --- /dev/null +++ b/Java/docs/GrantLabelStudioAccess.md @@ -0,0 +1,14 @@ +# GrantLabelStudioAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**projectId** | **Long** | Project ID, -1 for wildcard access to all projects | +**accessLevel** | [**AccessLevelEnum**](#AccessLevelEnum) | Access level to grant | [optional] + + +## Enum: AccessLevelEnum +Name | Value +---- | ----- +ANNOTATOR | "annotator" +NONE | "none" diff --git a/Java/docs/InlineResponse200.md b/Java/docs/InlineResponse200.md new file mode 100644 index 0000000..d78e8ee --- /dev/null +++ b/Java/docs/InlineResponse200.md @@ -0,0 +1,15 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userId** | **Long** | | [optional] +**projectId** | **Long** | | [optional] +**accessLevel** | [**AccessLevelEnum**](#AccessLevelEnum) | | [optional] + + +## Enum: AccessLevelEnum +Name | Value +---- | ----- +NONE | "none" +ANNOTATOR | "annotator" diff --git a/Java/docs/LabelStudioProjectAccess.md b/Java/docs/LabelStudioProjectAccess.md new file mode 100644 index 0000000..f71badc --- /dev/null +++ b/Java/docs/LabelStudioProjectAccess.md @@ -0,0 +1,20 @@ +# LabelStudioProjectAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**repoId** | **Long** | | [optional] +**projectId** | **Long** | Project ID, -1 means wildcard access to all projects | [optional] +**userId** | **Long** | User ID (present for user access entries) | [optional] +**teamId** | **Long** | Team ID (present for team access entries) | [optional] +**accessLevel** | [**AccessLevelEnum**](#AccessLevelEnum) | | [optional] +**createdUnix** | **Long** | | [optional] +**user** | [**User**](User.md) | | [optional] + + +## Enum: AccessLevelEnum +Name | Value +---- | ----- +NONE | "none" +ANNOTATOR | "annotator" diff --git a/Java/docs/OrganizationsApi.md b/Java/docs/OrganizationsApi.md new file mode 100644 index 0000000..135a296 --- /dev/null +++ b/Java/docs/OrganizationsApi.md @@ -0,0 +1,68 @@ +# OrganizationsApi + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createOrgTeam**](OrganizationsApi.md#createOrgTeam) | **POST** /admin/orgs/{orgname}/teams | Create an organization team + + +# **createOrgTeam** +> createOrgTeam(body, orgname) + +Create an organization team + +Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + +### Example +```java +// Import classes: +//import io.swagger.client.ApiClient; +//import io.swagger.client.ApiException; +//import io.swagger.client.Configuration; +//import io.swagger.client.auth.*; +//import io.swagger.client.api.OrganizationsApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); +// Configure HTTP basic authorization: basicAuth +HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth"); +basicAuth.setUsername("YOUR USERNAME"); +basicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: tokenAuth +ApiKeyAuth tokenAuth = (ApiKeyAuth) defaultClient.getAuthentication("tokenAuth"); +tokenAuth.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.setApiKeyPrefix("Token"); + +OrganizationsApi apiInstance = new OrganizationsApi(); +CreateAnnotatorTeam body = new CreateAnnotatorTeam(); // CreateAnnotatorTeam | +String orgname = "orgname_example"; // String | A DagsHub organization name +try { + apiInstance.createOrgTeam(body, orgname); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationsApi#createOrgTeam"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateAnnotatorTeam**](CreateAnnotatorTeam.md)| | + **orgname** | **String**| A DagsHub organization name | + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth)[tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + diff --git a/Java/docs/StorageIntegrationsApi.md b/Java/docs/StorageIntegrationsApi.md index a30f866..69b33a1 100644 --- a/Java/docs/StorageIntegrationsApi.md +++ b/Java/docs/StorageIntegrationsApi.md @@ -10,7 +10,7 @@ Method | HTTP request | Description # **getBucketContent** -> Files1 getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken) +> Files1 getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken) List contents in the path @@ -43,9 +43,10 @@ String bucket = "bucket_example"; // String | name and prefix of the bucket inte String path = "path_example"; // String | path of a folder in the repository Boolean includeSize = false; // Boolean | Integer limit = 100; // Integer | Maximum amount of items to return -String fromToken = "fromToken_example"; // String | Token, from which to continue iteration +Boolean paging = false; // Boolean | Whether or not paging is enabled +String fromToken = "fromToken_example"; // String | [Only if paging is enabled] token, from which to continue iteration try { - Files1 result = apiInstance.getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); + Files1 result = apiInstance.getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling StorageIntegrationsApi#getBucketContent"); @@ -64,7 +65,8 @@ Name | Type | Description | Notes **path** | **String**| path of a folder in the repository | **includeSize** | **Boolean**| | [optional] [default to false] **limit** | **Integer**| Maximum amount of items to return | [optional] [default to 100] - **fromToken** | **String**| Token, from which to continue iteration | [optional] + **paging** | **Boolean**| Whether or not paging is enabled | [optional] [default to false] + **fromToken** | **String**| [Only if paging is enabled] token, from which to continue iteration | [optional] ### Return type diff --git a/Java/src/main/java/io/swagger/client/ApiCallback.java b/Java/src/main/java/io/swagger/client/ApiCallback.java index 03ad833..603958a 100644 --- a/Java/src/main/java/io/swagger/client/ApiCallback.java +++ b/Java/src/main/java/io/swagger/client/ApiCallback.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/ApiClient.java b/Java/src/main/java/io/swagger/client/ApiClient.java index d15f06f..6e6caf2 100644 --- a/Java/src/main/java/io/swagger/client/ApiClient.java +++ b/Java/src/main/java/io/swagger/client/ApiClient.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/ApiException.java b/Java/src/main/java/io/swagger/client/ApiException.java index cc9a223..875e736 100644 --- a/Java/src/main/java/io/swagger/client/ApiException.java +++ b/Java/src/main/java/io/swagger/client/ApiException.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -15,7 +15,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class ApiException extends Exception { +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]")public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; private String responseBody = null; diff --git a/Java/src/main/java/io/swagger/client/ApiResponse.java b/Java/src/main/java/io/swagger/client/ApiResponse.java index 5f226e0..be72451 100644 --- a/Java/src/main/java/io/swagger/client/ApiResponse.java +++ b/Java/src/main/java/io/swagger/client/ApiResponse.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/Configuration.java b/Java/src/main/java/io/swagger/client/Configuration.java index dc464fa..054fa94 100644 --- a/Java/src/main/java/io/swagger/client/Configuration.java +++ b/Java/src/main/java/io/swagger/client/Configuration.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -12,7 +12,7 @@ package io.swagger.client; -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class Configuration { +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]")public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); /** diff --git a/Java/src/main/java/io/swagger/client/GzipRequestInterceptor.java b/Java/src/main/java/io/swagger/client/GzipRequestInterceptor.java index 6f6e1b9..bdccc6e 100644 --- a/Java/src/main/java/io/swagger/client/GzipRequestInterceptor.java +++ b/Java/src/main/java/io/swagger/client/GzipRequestInterceptor.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/JSON.java b/Java/src/main/java/io/swagger/client/JSON.java index 8b1f872..29699d7 100644 --- a/Java/src/main/java/io/swagger/client/JSON.java +++ b/Java/src/main/java/io/swagger/client/JSON.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/Pair.java b/Java/src/main/java/io/swagger/client/Pair.java index 2ae6d79..62b3154 100644 --- a/Java/src/main/java/io/swagger/client/Pair.java +++ b/Java/src/main/java/io/swagger/client/Pair.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -12,7 +12,7 @@ package io.swagger.client; -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class Pair { +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]")public class Pair { private String name = ""; private String value = ""; diff --git a/Java/src/main/java/io/swagger/client/ProgressRequestBody.java b/Java/src/main/java/io/swagger/client/ProgressRequestBody.java index b56a001..ad6c330 100644 --- a/Java/src/main/java/io/swagger/client/ProgressRequestBody.java +++ b/Java/src/main/java/io/swagger/client/ProgressRequestBody.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/ProgressResponseBody.java b/Java/src/main/java/io/swagger/client/ProgressResponseBody.java index d0162c2..d13209d 100644 --- a/Java/src/main/java/io/swagger/client/ProgressResponseBody.java +++ b/Java/src/main/java/io/swagger/client/ProgressResponseBody.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/StringUtil.java b/Java/src/main/java/io/swagger/client/StringUtil.java index f19a626..bfb146d 100644 --- a/Java/src/main/java/io/swagger/client/StringUtil.java +++ b/Java/src/main/java/io/swagger/client/StringUtil.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -12,7 +12,7 @@ package io.swagger.client; -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class StringUtil { +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]")public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). * diff --git a/Java/src/main/java/io/swagger/client/api/AnnotationsApi.java b/Java/src/main/java/io/swagger/client/api/AnnotationsApi.java new file mode 100644 index 0000000..de7eed1 --- /dev/null +++ b/Java/src/main/java/io/swagger/client/api/AnnotationsApi.java @@ -0,0 +1,1220 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.api; + +import io.swagger.client.ApiCallback; +import io.swagger.client.ApiClient; +import io.swagger.client.ApiException; +import io.swagger.client.ApiResponse; +import io.swagger.client.Configuration; +import io.swagger.client.Pair; +import io.swagger.client.ProgressRequestBody; +import io.swagger.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import io.swagger.client.model.GrantLabelStudioAccess; +import io.swagger.client.model.InlineResponse200; +import io.swagger.client.model.LabelStudioProjectAccess; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class AnnotationsApi { + private ApiClient apiClient; + + public AnnotationsApi() { + this(Configuration.getDefaultApiClient()); + } + + public AnnotationsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for getLabelStudioTeamAccess + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getLabelStudioTeamAccessCall(String owner, String repo, Long teamid, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "teamid" + "\\}", apiClient.escapeString(teamid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (projectId != null) + localVarQueryParams.addAll(apiClient.parameterToPair("project_id", projectId)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getLabelStudioTeamAccessValidateBeforeCall(String owner, String repo, Long teamid, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling getLabelStudioTeamAccess(Async)"); + } + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling getLabelStudioTeamAccess(Async)"); + } + // verify the required parameter 'teamid' is set + if (teamid == null) { + throw new ApiException("Missing the required parameter 'teamid' when calling getLabelStudioTeamAccess(Async)"); + } + + com.squareup.okhttp.Call call = getLabelStudioTeamAccessCall(owner, repo, teamid, projectId, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Get team access level for annotation projects + * Get the access level for a specific team and project (or all projects) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return LabelStudioProjectAccess + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public LabelStudioProjectAccess getLabelStudioTeamAccess(String owner, String repo, Long teamid, Long projectId) throws ApiException { + ApiResponse resp = getLabelStudioTeamAccessWithHttpInfo(owner, repo, teamid, projectId); + return resp.getData(); + } + + /** + * Get team access level for annotation projects + * Get the access level for a specific team and project (or all projects) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return ApiResponse<LabelStudioProjectAccess> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getLabelStudioTeamAccessWithHttpInfo(String owner, String repo, Long teamid, Long projectId) throws ApiException { + com.squareup.okhttp.Call call = getLabelStudioTeamAccessValidateBeforeCall(owner, repo, teamid, projectId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get team access level for annotation projects (asynchronously) + * Get the access level for a specific team and project (or all projects) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getLabelStudioTeamAccessAsync(String owner, String repo, Long teamid, Long projectId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getLabelStudioTeamAccessValidateBeforeCall(owner, repo, teamid, projectId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getLabelStudioUserAccess + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getLabelStudioUserAccessCall(String owner, String repo, Long userid, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/annotations/access/users/{userid}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "userid" + "\\}", apiClient.escapeString(userid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (projectId != null) + localVarQueryParams.addAll(apiClient.parameterToPair("project_id", projectId)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getLabelStudioUserAccessValidateBeforeCall(String owner, String repo, Long userid, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling getLabelStudioUserAccess(Async)"); + } + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling getLabelStudioUserAccess(Async)"); + } + // verify the required parameter 'userid' is set + if (userid == null) { + throw new ApiException("Missing the required parameter 'userid' when calling getLabelStudioUserAccess(Async)"); + } + + com.squareup.okhttp.Call call = getLabelStudioUserAccessCall(owner, repo, userid, projectId, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Get user access level for annotation projects + * Get the access level for a specific user and project (or all projects) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return InlineResponse200 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public InlineResponse200 getLabelStudioUserAccess(String owner, String repo, Long userid, Long projectId) throws ApiException { + ApiResponse resp = getLabelStudioUserAccessWithHttpInfo(owner, repo, userid, projectId); + return resp.getData(); + } + + /** + * Get user access level for annotation projects + * Get the access level for a specific user and project (or all projects) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return ApiResponse<InlineResponse200> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getLabelStudioUserAccessWithHttpInfo(String owner, String repo, Long userid, Long projectId) throws ApiException { + com.squareup.okhttp.Call call = getLabelStudioUserAccessValidateBeforeCall(owner, repo, userid, projectId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get user access level for annotation projects (asynchronously) + * Get the access level for a specific user and project (or all projects) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getLabelStudioUserAccessAsync(String owner, String repo, Long userid, Long projectId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getLabelStudioUserAccessValidateBeforeCall(owner, repo, userid, projectId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for grantLabelStudioTeamAccess + * @param body (required) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call grantLabelStudioTeamAccessCall(GrantLabelStudioAccess body, String owner, String repo, Long teamid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "teamid" + "\\}", apiClient.escapeString(teamid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call grantLabelStudioTeamAccessValidateBeforeCall(GrantLabelStudioAccess body, String owner, String repo, Long teamid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling grantLabelStudioTeamAccess(Async)"); + } + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling grantLabelStudioTeamAccess(Async)"); + } + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling grantLabelStudioTeamAccess(Async)"); + } + // verify the required parameter 'teamid' is set + if (teamid == null) { + throw new ApiException("Missing the required parameter 'teamid' when calling grantLabelStudioTeamAccess(Async)"); + } + + com.squareup.okhttp.Call call = grantLabelStudioTeamAccessCall(body, owner, repo, teamid, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Grant team access to annotation projects + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * @param body (required) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void grantLabelStudioTeamAccess(GrantLabelStudioAccess body, String owner, String repo, Long teamid) throws ApiException { + grantLabelStudioTeamAccessWithHttpInfo(body, owner, repo, teamid); + } + + /** + * Grant team access to annotation projects + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * @param body (required) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse grantLabelStudioTeamAccessWithHttpInfo(GrantLabelStudioAccess body, String owner, String repo, Long teamid) throws ApiException { + com.squareup.okhttp.Call call = grantLabelStudioTeamAccessValidateBeforeCall(body, owner, repo, teamid, null, null); + return apiClient.execute(call); + } + + /** + * Grant team access to annotation projects (asynchronously) + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * @param body (required) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call grantLabelStudioTeamAccessAsync(GrantLabelStudioAccess body, String owner, String repo, Long teamid, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = grantLabelStudioTeamAccessValidateBeforeCall(body, owner, repo, teamid, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for grantLabelStudioUserAccess + * @param body (required) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call grantLabelStudioUserAccessCall(GrantLabelStudioAccess body, String owner, String repo, Long userid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/annotations/access/users/{userid}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "userid" + "\\}", apiClient.escapeString(userid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call grantLabelStudioUserAccessValidateBeforeCall(GrantLabelStudioAccess body, String owner, String repo, Long userid, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling grantLabelStudioUserAccess(Async)"); + } + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling grantLabelStudioUserAccess(Async)"); + } + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling grantLabelStudioUserAccess(Async)"); + } + // verify the required parameter 'userid' is set + if (userid == null) { + throw new ApiException("Missing the required parameter 'userid' when calling grantLabelStudioUserAccess(Async)"); + } + + com.squareup.okhttp.Call call = grantLabelStudioUserAccessCall(body, owner, repo, userid, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Grant user access to annotation projects + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * @param body (required) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void grantLabelStudioUserAccess(GrantLabelStudioAccess body, String owner, String repo, Long userid) throws ApiException { + grantLabelStudioUserAccessWithHttpInfo(body, owner, repo, userid); + } + + /** + * Grant user access to annotation projects + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * @param body (required) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse grantLabelStudioUserAccessWithHttpInfo(GrantLabelStudioAccess body, String owner, String repo, Long userid) throws ApiException { + com.squareup.okhttp.Call call = grantLabelStudioUserAccessValidateBeforeCall(body, owner, repo, userid, null, null); + return apiClient.execute(call); + } + + /** + * Grant user access to annotation projects (asynchronously) + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * @param body (required) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call grantLabelStudioUserAccessAsync(GrantLabelStudioAccess body, String owner, String repo, Long userid, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = grantLabelStudioUserAccessValidateBeforeCall(body, owner, repo, userid, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for listLabelStudioTeamAccess + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call listLabelStudioTeamAccessCall(String owner, String repo, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/annotations/access/teams" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (projectId != null) + localVarQueryParams.addAll(apiClient.parameterToPair("project_id", projectId)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call listLabelStudioTeamAccessValidateBeforeCall(String owner, String repo, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling listLabelStudioTeamAccess(Async)"); + } + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling listLabelStudioTeamAccess(Async)"); + } + + com.squareup.okhttp.Call call = listLabelStudioTeamAccessCall(owner, repo, projectId, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * List team access entries for annotation projects + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return List<LabelStudioProjectAccess> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List listLabelStudioTeamAccess(String owner, String repo, Long projectId) throws ApiException { + ApiResponse> resp = listLabelStudioTeamAccessWithHttpInfo(owner, repo, projectId); + return resp.getData(); + } + + /** + * List team access entries for annotation projects + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return ApiResponse<List<LabelStudioProjectAccess>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> listLabelStudioTeamAccessWithHttpInfo(String owner, String repo, Long projectId) throws ApiException { + com.squareup.okhttp.Call call = listLabelStudioTeamAccessValidateBeforeCall(owner, repo, projectId, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List team access entries for annotation projects (asynchronously) + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call listLabelStudioTeamAccessAsync(String owner, String repo, Long projectId, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = listLabelStudioTeamAccessValidateBeforeCall(owner, repo, projectId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for listLabelStudioUserAccess + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call listLabelStudioUserAccessCall(String owner, String repo, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/annotations/access/users" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (projectId != null) + localVarQueryParams.addAll(apiClient.parameterToPair("project_id", projectId)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call listLabelStudioUserAccessValidateBeforeCall(String owner, String repo, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling listLabelStudioUserAccess(Async)"); + } + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling listLabelStudioUserAccess(Async)"); + } + + com.squareup.okhttp.Call call = listLabelStudioUserAccessCall(owner, repo, projectId, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * List user access entries for annotation projects + * Get a list of users with access to Label Studio annotation projects in the repository + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return List<LabelStudioProjectAccess> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List listLabelStudioUserAccess(String owner, String repo, Long projectId) throws ApiException { + ApiResponse> resp = listLabelStudioUserAccessWithHttpInfo(owner, repo, projectId); + return resp.getData(); + } + + /** + * List user access entries for annotation projects + * Get a list of users with access to Label Studio annotation projects in the repository + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return ApiResponse<List<LabelStudioProjectAccess>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> listLabelStudioUserAccessWithHttpInfo(String owner, String repo, Long projectId) throws ApiException { + com.squareup.okhttp.Call call = listLabelStudioUserAccessValidateBeforeCall(owner, repo, projectId, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List user access entries for annotation projects (asynchronously) + * Get a list of users with access to Label Studio annotation projects in the repository + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call listLabelStudioUserAccessAsync(String owner, String repo, Long projectId, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = listLabelStudioUserAccessValidateBeforeCall(owner, repo, projectId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for revokeLabelStudioTeamAccess + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call revokeLabelStudioTeamAccessCall(String owner, String repo, Long teamid, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "teamid" + "\\}", apiClient.escapeString(teamid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (projectId != null) + localVarQueryParams.addAll(apiClient.parameterToPair("project_id", projectId)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call revokeLabelStudioTeamAccessValidateBeforeCall(String owner, String repo, Long teamid, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling revokeLabelStudioTeamAccess(Async)"); + } + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling revokeLabelStudioTeamAccess(Async)"); + } + // verify the required parameter 'teamid' is set + if (teamid == null) { + throw new ApiException("Missing the required parameter 'teamid' when calling revokeLabelStudioTeamAccess(Async)"); + } + + com.squareup.okhttp.Call call = revokeLabelStudioTeamAccessCall(owner, repo, teamid, projectId, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Revoke team access to annotation projects + * Revoke a team's access to Label Studio annotation projects + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void revokeLabelStudioTeamAccess(String owner, String repo, Long teamid, Long projectId) throws ApiException { + revokeLabelStudioTeamAccessWithHttpInfo(owner, repo, teamid, projectId); + } + + /** + * Revoke team access to annotation projects + * Revoke a team's access to Label Studio annotation projects + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse revokeLabelStudioTeamAccessWithHttpInfo(String owner, String repo, Long teamid, Long projectId) throws ApiException { + com.squareup.okhttp.Call call = revokeLabelStudioTeamAccessValidateBeforeCall(owner, repo, teamid, projectId, null, null); + return apiClient.execute(call); + } + + /** + * Revoke team access to annotation projects (asynchronously) + * Revoke a team's access to Label Studio annotation projects + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param teamid Team ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call revokeLabelStudioTeamAccessAsync(String owner, String repo, Long teamid, Long projectId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = revokeLabelStudioTeamAccessValidateBeforeCall(owner, repo, teamid, projectId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for revokeLabelStudioUserAccess + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call revokeLabelStudioUserAccessCall(String owner, String repo, Long userid, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/annotations/access/users/{userid}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "userid" + "\\}", apiClient.escapeString(userid.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (projectId != null) + localVarQueryParams.addAll(apiClient.parameterToPair("project_id", projectId)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call revokeLabelStudioUserAccessValidateBeforeCall(String owner, String repo, Long userid, Long projectId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling revokeLabelStudioUserAccess(Async)"); + } + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling revokeLabelStudioUserAccess(Async)"); + } + // verify the required parameter 'userid' is set + if (userid == null) { + throw new ApiException("Missing the required parameter 'userid' when calling revokeLabelStudioUserAccess(Async)"); + } + + com.squareup.okhttp.Call call = revokeLabelStudioUserAccessCall(owner, repo, userid, projectId, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Revoke user access to annotation projects + * Revoke a user's access to Label Studio annotation projects + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void revokeLabelStudioUserAccess(String owner, String repo, Long userid, Long projectId) throws ApiException { + revokeLabelStudioUserAccessWithHttpInfo(owner, repo, userid, projectId); + } + + /** + * Revoke user access to annotation projects + * Revoke a user's access to Label Studio annotation projects + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse revokeLabelStudioUserAccessWithHttpInfo(String owner, String repo, Long userid, Long projectId) throws ApiException { + com.squareup.okhttp.Call call = revokeLabelStudioUserAccessValidateBeforeCall(owner, repo, userid, projectId, null, null); + return apiClient.execute(call); + } + + /** + * Revoke user access to annotation projects (asynchronously) + * Revoke a user's access to Label Studio annotation projects + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param userid User ID (required) + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call revokeLabelStudioUserAccessAsync(String owner, String repo, Long userid, Long projectId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = revokeLabelStudioUserAccessValidateBeforeCall(owner, repo, userid, projectId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/Java/src/main/java/io/swagger/client/api/BranchesApi.java b/Java/src/main/java/io/swagger/client/api/BranchesApi.java index e0eaa8f..2501022 100644 --- a/Java/src/main/java/io/swagger/client/api/BranchesApi.java +++ b/Java/src/main/java/io/swagger/client/api/BranchesApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/api/CollaboratorsApi.java b/Java/src/main/java/io/swagger/client/api/CollaboratorsApi.java index 392a632..7293e41 100644 --- a/Java/src/main/java/io/swagger/client/api/CollaboratorsApi.java +++ b/Java/src/main/java/io/swagger/client/api/CollaboratorsApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/api/CommitsApi.java b/Java/src/main/java/io/swagger/client/api/CommitsApi.java index 6d5eb49..2135a48 100644 --- a/Java/src/main/java/io/swagger/client/api/CommitsApi.java +++ b/Java/src/main/java/io/swagger/client/api/CommitsApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/api/ContentApi.java b/Java/src/main/java/io/swagger/client/api/ContentApi.java index 08721d4..ee913cd 100644 --- a/Java/src/main/java/io/swagger/client/api/ContentApi.java +++ b/Java/src/main/java/io/swagger/client/api/ContentApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/api/ExperimentsApi.java b/Java/src/main/java/io/swagger/client/api/ExperimentsApi.java index a449751..dff522a 100644 --- a/Java/src/main/java/io/swagger/client/api/ExperimentsApi.java +++ b/Java/src/main/java/io/swagger/client/api/ExperimentsApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/api/IssuesApi.java b/Java/src/main/java/io/swagger/client/api/IssuesApi.java index 6efad3d..f4cdf0d 100644 --- a/Java/src/main/java/io/swagger/client/api/IssuesApi.java +++ b/Java/src/main/java/io/swagger/client/api/IssuesApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/api/OrganizationsApi.java b/Java/src/main/java/io/swagger/client/api/OrganizationsApi.java new file mode 100644 index 0000000..dc28c45 --- /dev/null +++ b/Java/src/main/java/io/swagger/client/api/OrganizationsApi.java @@ -0,0 +1,185 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.api; + +import io.swagger.client.ApiCallback; +import io.swagger.client.ApiClient; +import io.swagger.client.ApiException; +import io.swagger.client.ApiResponse; +import io.swagger.client.Configuration; +import io.swagger.client.Pair; +import io.swagger.client.ProgressRequestBody; +import io.swagger.client.ProgressResponseBody; + +import com.google.gson.reflect.TypeToken; + +import java.io.IOException; + + +import io.swagger.client.model.CreateAnnotatorTeam; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class OrganizationsApi { + private ApiClient apiClient; + + public OrganizationsApi() { + this(Configuration.getDefaultApiClient()); + } + + public OrganizationsApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Build call for createOrgTeam + * @param body (required) + * @param orgname A DagsHub organization name (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call createOrgTeamCall(CreateAnnotatorTeam body, String orgname, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/admin/orgs/{orgname}/teams" + .replaceAll("\\{" + "orgname" + "\\}", apiClient.escapeString(orgname.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "basicAuth", "tokenAuth" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call createOrgTeamValidateBeforeCall(CreateAnnotatorTeam body, String orgname, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling createOrgTeam(Async)"); + } + // verify the required parameter 'orgname' is set + if (orgname == null) { + throw new ApiException("Missing the required parameter 'orgname' when calling createOrgTeam(Async)"); + } + + com.squareup.okhttp.Call call = createOrgTeamCall(body, orgname, progressListener, progressRequestListener); + return call; + + + + + + } + + /** + * Create an organization team + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * @param body (required) + * @param orgname A DagsHub organization name (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void createOrgTeam(CreateAnnotatorTeam body, String orgname) throws ApiException { + createOrgTeamWithHttpInfo(body, orgname); + } + + /** + * Create an organization team + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * @param body (required) + * @param orgname A DagsHub organization name (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse createOrgTeamWithHttpInfo(CreateAnnotatorTeam body, String orgname) throws ApiException { + com.squareup.okhttp.Call call = createOrgTeamValidateBeforeCall(body, orgname, null, null); + return apiClient.execute(call); + } + + /** + * Create an organization team (asynchronously) + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * @param body (required) + * @param orgname A DagsHub organization name (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call createOrgTeamAsync(CreateAnnotatorTeam body, String orgname, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = createOrgTeamValidateBeforeCall(body, orgname, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } +} diff --git a/Java/src/main/java/io/swagger/client/api/ReleasesApi.java b/Java/src/main/java/io/swagger/client/api/ReleasesApi.java index d8c1cd8..0f9b152 100644 --- a/Java/src/main/java/io/swagger/client/api/ReleasesApi.java +++ b/Java/src/main/java/io/swagger/client/api/ReleasesApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/api/RepositoryApi.java b/Java/src/main/java/io/swagger/client/api/RepositoryApi.java index 648949d..50ae935 100644 --- a/Java/src/main/java/io/swagger/client/api/RepositoryApi.java +++ b/Java/src/main/java/io/swagger/client/api/RepositoryApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/api/StorageIntegrationsApi.java b/Java/src/main/java/io/swagger/client/api/StorageIntegrationsApi.java index 4a743a7..67c9659 100644 --- a/Java/src/main/java/io/swagger/client/api/StorageIntegrationsApi.java +++ b/Java/src/main/java/io/swagger/client/api/StorageIntegrationsApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -63,13 +63,14 @@ public void setApiClient(ApiClient apiClient) { * @param path path of a folder in the repository (required) * @param includeSize (optional, default to false) * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) + * @param paging Whether or not paging is enabled (optional, default to false) + * @param fromToken [Only if paging is enabled] token, from which to continue iteration (optional) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call getBucketContentCall(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, String fromToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call getBucketContentCall(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, Boolean paging, String fromToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -86,6 +87,8 @@ public com.squareup.okhttp.Call getBucketContentCall(String owner, String repo, localVarQueryParams.addAll(apiClient.parameterToPair("include_size", includeSize)); if (limit != null) localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (paging != null) + localVarQueryParams.addAll(apiClient.parameterToPair("paging", paging)); if (fromToken != null) localVarQueryParams.addAll(apiClient.parameterToPair("from_token", fromToken)); @@ -122,7 +125,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call getBucketContentValidateBeforeCall(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, String fromToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call getBucketContentValidateBeforeCall(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, Boolean paging, String fromToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { throw new ApiException("Missing the required parameter 'owner' when calling getBucketContent(Async)"); @@ -144,7 +147,7 @@ private com.squareup.okhttp.Call getBucketContentValidateBeforeCall(String owner throw new ApiException("Missing the required parameter 'path' when calling getBucketContent(Async)"); } - com.squareup.okhttp.Call call = getBucketContentCall(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getBucketContentCall(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken, progressListener, progressRequestListener); return call; @@ -163,12 +166,13 @@ private com.squareup.okhttp.Call getBucketContentValidateBeforeCall(String owner * @param path path of a folder in the repository (required) * @param includeSize (optional, default to false) * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) + * @param paging Whether or not paging is enabled (optional, default to false) + * @param fromToken [Only if paging is enabled] token, from which to continue iteration (optional) * @return Files1 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Files1 getBucketContent(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, String fromToken) throws ApiException { - ApiResponse resp = getBucketContentWithHttpInfo(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); + public Files1 getBucketContent(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, Boolean paging, String fromToken) throws ApiException { + ApiResponse resp = getBucketContentWithHttpInfo(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken); return resp.getData(); } @@ -182,12 +186,13 @@ public Files1 getBucketContent(String owner, String repo, String protocol, Strin * @param path path of a folder in the repository (required) * @param includeSize (optional, default to false) * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) + * @param paging Whether or not paging is enabled (optional, default to false) + * @param fromToken [Only if paging is enabled] token, from which to continue iteration (optional) * @return ApiResponse<Files1> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse getBucketContentWithHttpInfo(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, String fromToken) throws ApiException { - com.squareup.okhttp.Call call = getBucketContentValidateBeforeCall(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, null, null); + public ApiResponse getBucketContentWithHttpInfo(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, Boolean paging, String fromToken) throws ApiException { + com.squareup.okhttp.Call call = getBucketContentValidateBeforeCall(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -202,12 +207,13 @@ public ApiResponse getBucketContentWithHttpInfo(String owner, String rep * @param path path of a folder in the repository (required) * @param includeSize (optional, default to false) * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) + * @param paging Whether or not paging is enabled (optional, default to false) + * @param fromToken [Only if paging is enabled] token, from which to continue iteration (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call getBucketContentAsync(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, String fromToken, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call getBucketContentAsync(String owner, String repo, String protocol, String bucket, String path, Boolean includeSize, Integer limit, Boolean paging, String fromToken, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -228,7 +234,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = getBucketContentValidateBeforeCall(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getBucketContentValidateBeforeCall(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; diff --git a/Java/src/main/java/io/swagger/client/api/UserApi.java b/Java/src/main/java/io/swagger/client/api/UserApi.java index 133e6a1..ddea1d0 100644 --- a/Java/src/main/java/io/swagger/client/api/UserApi.java +++ b/Java/src/main/java/io/swagger/client/api/UserApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/api/WebhooksApi.java b/Java/src/main/java/io/swagger/client/api/WebhooksApi.java index 8fd055c..207d5ae 100644 --- a/Java/src/main/java/io/swagger/client/api/WebhooksApi.java +++ b/Java/src/main/java/io/swagger/client/api/WebhooksApi.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/auth/ApiKeyAuth.java b/Java/src/main/java/io/swagger/client/auth/ApiKeyAuth.java index 1c8e0e2..c7a1633 100644 --- a/Java/src/main/java/io/swagger/client/auth/ApiKeyAuth.java +++ b/Java/src/main/java/io/swagger/client/auth/ApiKeyAuth.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -17,7 +17,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class ApiKeyAuth implements Authentication { +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]")public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/Java/src/main/java/io/swagger/client/auth/Authentication.java b/Java/src/main/java/io/swagger/client/auth/Authentication.java index 639b572..b1f3c18 100644 --- a/Java/src/main/java/io/swagger/client/auth/Authentication.java +++ b/Java/src/main/java/io/swagger/client/auth/Authentication.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/auth/HttpBasicAuth.java b/Java/src/main/java/io/swagger/client/auth/HttpBasicAuth.java index 0e40b98..8dab392 100644 --- a/Java/src/main/java/io/swagger/client/auth/HttpBasicAuth.java +++ b/Java/src/main/java/io/swagger/client/auth/HttpBasicAuth.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/auth/OAuth.java b/Java/src/main/java/io/swagger/client/auth/OAuth.java index 1a3faee..27ba7eb 100644 --- a/Java/src/main/java/io/swagger/client/auth/OAuth.java +++ b/Java/src/main/java/io/swagger/client/auth/OAuth.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -17,7 +17,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]")public class OAuth implements Authentication { +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]")public class OAuth implements Authentication { private String accessToken; public String getAccessToken() { diff --git a/Java/src/main/java/io/swagger/client/auth/OAuthFlow.java b/Java/src/main/java/io/swagger/client/auth/OAuthFlow.java index 54dfa8b..73e86d0 100644 --- a/Java/src/main/java/io/swagger/client/auth/OAuthFlow.java +++ b/Java/src/main/java/io/swagger/client/auth/OAuthFlow.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/model/CollaboratorsCollaboratorBody.java b/Java/src/main/java/io/swagger/client/model/CollaboratorsCollaboratorBody.java index f8d1748..cb52f22 100644 --- a/Java/src/main/java/io/swagger/client/model/CollaboratorsCollaboratorBody.java +++ b/Java/src/main/java/io/swagger/client/model/CollaboratorsCollaboratorBody.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * CollaboratorsCollaboratorBody */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class CollaboratorsCollaboratorBody { @SerializedName("permission") private String permission = "write"; diff --git a/Java/src/main/java/io/swagger/client/model/CreateAnnotatorTeam.java b/Java/src/main/java/io/swagger/client/model/CreateAnnotatorTeam.java new file mode 100644 index 0000000..e0adbe4 --- /dev/null +++ b/Java/src/main/java/io/swagger/client/model/CreateAnnotatorTeam.java @@ -0,0 +1,243 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * CreateAnnotatorTeam + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") +public class CreateAnnotatorTeam { + @SerializedName("name") + private String name = null; + + @SerializedName("description") + private String description = null; + + /** + * Type of team - normal teams have repository access, annotator teams only have annotation project access + */ + @JsonAdapter(TeamTypeEnum.Adapter.class) + public enum TeamTypeEnum { + NORMAL("normal"), + ANNOTATOR("annotator"); + + private String value; + + TeamTypeEnum(String value) { + this.value = value; + } + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + public static TeamTypeEnum fromValue(String input) { + for (TeamTypeEnum b : TeamTypeEnum.values()) { + if (b.value.equals(input)) { + return b; + } + } + return null; + } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TeamTypeEnum enumeration) throws IOException { + jsonWriter.value(String.valueOf(enumeration.getValue())); + } + + @Override + public TeamTypeEnum read(final JsonReader jsonReader) throws IOException { + Object value = jsonReader.nextString(); + return TeamTypeEnum.fromValue((String)(value)); + } + } + } @SerializedName("team_type") + private TeamTypeEnum teamType = TeamTypeEnum.NORMAL; + + /** + * Repository permission level (required for normal teams, ignored for annotator teams) + */ + @JsonAdapter(PermissionEnum.Adapter.class) + public enum PermissionEnum { + READ("read"), + WRITE("write"), + ADMIN("admin"); + + private String value; + + PermissionEnum(String value) { + this.value = value; + } + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + public static PermissionEnum fromValue(String input) { + for (PermissionEnum b : PermissionEnum.values()) { + if (b.value.equals(input)) { + return b; + } + } + return null; + } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final PermissionEnum enumeration) throws IOException { + jsonWriter.value(String.valueOf(enumeration.getValue())); + } + + @Override + public PermissionEnum read(final JsonReader jsonReader) throws IOException { + Object value = jsonReader.nextString(); + return PermissionEnum.fromValue((String)(value)); + } + } + } @SerializedName("permission") + private PermissionEnum permission = null; + + public CreateAnnotatorTeam name(String name) { + this.name = name; + return this; + } + + /** + * Team name + * @return name + **/ + @Schema(example = "Data Annotators", required = true, description = "Team name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public CreateAnnotatorTeam description(String description) { + this.description = description; + return this; + } + + /** + * Team description + * @return description + **/ + @Schema(example = "Team for annotation work", description = "Team description") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public CreateAnnotatorTeam teamType(TeamTypeEnum teamType) { + this.teamType = teamType; + return this; + } + + /** + * Type of team - normal teams have repository access, annotator teams only have annotation project access + * @return teamType + **/ + @Schema(description = "Type of team - normal teams have repository access, annotator teams only have annotation project access") + public TeamTypeEnum getTeamType() { + return teamType; + } + + public void setTeamType(TeamTypeEnum teamType) { + this.teamType = teamType; + } + + public CreateAnnotatorTeam permission(PermissionEnum permission) { + this.permission = permission; + return this; + } + + /** + * Repository permission level (required for normal teams, ignored for annotator teams) + * @return permission + **/ + @Schema(description = "Repository permission level (required for normal teams, ignored for annotator teams)") + public PermissionEnum getPermission() { + return permission; + } + + public void setPermission(PermissionEnum permission) { + this.permission = permission; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateAnnotatorTeam createAnnotatorTeam = (CreateAnnotatorTeam) o; + return Objects.equals(this.name, createAnnotatorTeam.name) && + Objects.equals(this.description, createAnnotatorTeam.description) && + Objects.equals(this.teamType, createAnnotatorTeam.teamType) && + Objects.equals(this.permission, createAnnotatorTeam.permission); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, teamType, permission); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateAnnotatorTeam {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" teamType: ").append(toIndentedString(teamType)).append("\n"); + sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/Java/src/main/java/io/swagger/client/model/CreateRepo.java b/Java/src/main/java/io/swagger/client/model/CreateRepo.java index a46a535..73c3d54 100644 --- a/Java/src/main/java/io/swagger/client/model/CreateRepo.java +++ b/Java/src/main/java/io/swagger/client/model/CreateRepo.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * CreateRepo */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class CreateRepo { @SerializedName("name") private String name = null; diff --git a/Java/src/main/java/io/swagger/client/model/EditExperimentPost.java b/Java/src/main/java/io/swagger/client/model/EditExperimentPost.java index 085bf94..e44c19e 100644 --- a/Java/src/main/java/io/swagger/client/model/EditExperimentPost.java +++ b/Java/src/main/java/io/swagger/client/model/EditExperimentPost.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * EditExperimentPost */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class EditExperimentPost { @SerializedName("name") private String name = null; diff --git a/Java/src/main/java/io/swagger/client/model/ExperimentKeys.java b/Java/src/main/java/io/swagger/client/model/ExperimentKeys.java index e5c04a0..967159b 100644 --- a/Java/src/main/java/io/swagger/client/model/ExperimentKeys.java +++ b/Java/src/main/java/io/swagger/client/model/ExperimentKeys.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,7 +27,7 @@ * ExperimentKeys */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class ExperimentKeys { @SerializedName("experiment_keys") private List experimentKeys = new ArrayList(); diff --git a/Java/src/main/java/io/swagger/client/model/File.java b/Java/src/main/java/io/swagger/client/model/File.java index 6dedeaf..ece3b31 100644 --- a/Java/src/main/java/io/swagger/client/model/File.java +++ b/Java/src/main/java/io/swagger/client/model/File.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * File */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class File { @SerializedName("path") private String path = null; diff --git a/Java/src/main/java/io/swagger/client/model/Files.java b/Java/src/main/java/io/swagger/client/model/Files.java index e484d5f..2a41d69 100644 --- a/Java/src/main/java/io/swagger/client/model/Files.java +++ b/Java/src/main/java/io/swagger/client/model/Files.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -21,7 +21,7 @@ * Files */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class Files extends ArrayList { @Override diff --git a/Java/src/main/java/io/swagger/client/model/Files1.java b/Java/src/main/java/io/swagger/client/model/Files1.java index 510960e..20c4ada 100644 --- a/Java/src/main/java/io/swagger/client/model/Files1.java +++ b/Java/src/main/java/io/swagger/client/model/Files1.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -28,14 +28,11 @@ * Files1 */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class Files1 { @SerializedName("entries") private List entries = null; - @SerializedName("limit") - private Integer limit = null; - @SerializedName("next_token") private String nextToken = null; @@ -65,34 +62,16 @@ public void setEntries(List entries) { this.entries = entries; } - public Files1 limit(Integer limit) { - this.limit = limit; - return this; - } - - /** - * Get limit - * @return limit - **/ - @Schema(description = "") - public Integer getLimit() { - return limit; - } - - public void setLimit(Integer limit) { - this.limit = limit; - } - public Files1 nextToken(String nextToken) { this.nextToken = nextToken; return this; } /** - * Get nextToken + * Next token to continue pagination from * @return nextToken **/ - @Schema(description = "") + @Schema(description = "Next token to continue pagination from") public String getNextToken() { return nextToken; } @@ -112,13 +91,12 @@ public boolean equals(java.lang.Object o) { } Files1 files1 = (Files1) o; return Objects.equals(this.entries, files1.entries) && - Objects.equals(this.limit, files1.limit) && Objects.equals(this.nextToken, files1.nextToken); } @Override public int hashCode() { - return Objects.hash(entries, limit, nextToken); + return Objects.hash(entries, nextToken); } @@ -128,7 +106,6 @@ public String toString() { sb.append("class Files1 {\n"); sb.append(" entries: ").append(toIndentedString(entries)).append("\n"); - sb.append(" limit: ").append(toIndentedString(limit)).append("\n"); sb.append(" nextToken: ").append(toIndentedString(nextToken)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/Java/src/main/java/io/swagger/client/model/GrantLabelStudioAccess.java b/Java/src/main/java/io/swagger/client/model/GrantLabelStudioAccess.java new file mode 100644 index 0000000..45c8eec --- /dev/null +++ b/Java/src/main/java/io/swagger/client/model/GrantLabelStudioAccess.java @@ -0,0 +1,155 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * GrantLabelStudioAccess + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") +public class GrantLabelStudioAccess { + @SerializedName("project_id") + private Long projectId = null; + + /** + * Access level to grant + */ + @JsonAdapter(AccessLevelEnum.Adapter.class) + public enum AccessLevelEnum { + ANNOTATOR("annotator"), + NONE("none"); + + private String value; + + AccessLevelEnum(String value) { + this.value = value; + } + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + public static AccessLevelEnum fromValue(String input) { + for (AccessLevelEnum b : AccessLevelEnum.values()) { + if (b.value.equals(input)) { + return b; + } + } + return null; + } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccessLevelEnum enumeration) throws IOException { + jsonWriter.value(String.valueOf(enumeration.getValue())); + } + + @Override + public AccessLevelEnum read(final JsonReader jsonReader) throws IOException { + Object value = jsonReader.nextString(); + return AccessLevelEnum.fromValue((String)(value)); + } + } + } @SerializedName("access_level") + private AccessLevelEnum accessLevel = AccessLevelEnum.ANNOTATOR; + + public GrantLabelStudioAccess projectId(Long projectId) { + this.projectId = projectId; + return this; + } + + /** + * Project ID, -1 for wildcard access to all projects + * @return projectId + **/ + @Schema(example = "-1", required = true, description = "Project ID, -1 for wildcard access to all projects") + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public GrantLabelStudioAccess accessLevel(AccessLevelEnum accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + /** + * Access level to grant + * @return accessLevel + **/ + @Schema(description = "Access level to grant") + public AccessLevelEnum getAccessLevel() { + return accessLevel; + } + + public void setAccessLevel(AccessLevelEnum accessLevel) { + this.accessLevel = accessLevel; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GrantLabelStudioAccess grantLabelStudioAccess = (GrantLabelStudioAccess) o; + return Objects.equals(this.projectId, grantLabelStudioAccess.projectId) && + Objects.equals(this.accessLevel, grantLabelStudioAccess.accessLevel); + } + + @Override + public int hashCode() { + return Objects.hash(projectId, accessLevel); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GrantLabelStudioAccess {\n"); + + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" accessLevel: ").append(toIndentedString(accessLevel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/Java/src/main/java/io/swagger/client/model/HooksIdBody.java b/Java/src/main/java/io/swagger/client/model/HooksIdBody.java index ad9fd52..9d6ee7e 100644 --- a/Java/src/main/java/io/swagger/client/model/HooksIdBody.java +++ b/Java/src/main/java/io/swagger/client/model/HooksIdBody.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,7 +27,7 @@ * HooksIdBody */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class HooksIdBody { @SerializedName("config") private WebhookConfig config = null; diff --git a/Java/src/main/java/io/swagger/client/model/InlineResponse200.java b/Java/src/main/java/io/swagger/client/model/InlineResponse200.java new file mode 100644 index 0000000..cea2b67 --- /dev/null +++ b/Java/src/main/java/io/swagger/client/model/InlineResponse200.java @@ -0,0 +1,178 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * InlineResponse200 + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") +public class InlineResponse200 { + @SerializedName("user_id") + private Long userId = null; + + @SerializedName("project_id") + private Long projectId = null; + + /** + * Gets or Sets accessLevel + */ + @JsonAdapter(AccessLevelEnum.Adapter.class) + public enum AccessLevelEnum { + NONE("none"), + ANNOTATOR("annotator"); + + private String value; + + AccessLevelEnum(String value) { + this.value = value; + } + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + public static AccessLevelEnum fromValue(String input) { + for (AccessLevelEnum b : AccessLevelEnum.values()) { + if (b.value.equals(input)) { + return b; + } + } + return null; + } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccessLevelEnum enumeration) throws IOException { + jsonWriter.value(String.valueOf(enumeration.getValue())); + } + + @Override + public AccessLevelEnum read(final JsonReader jsonReader) throws IOException { + Object value = jsonReader.nextString(); + return AccessLevelEnum.fromValue((String)(value)); + } + } + } @SerializedName("access_level") + private AccessLevelEnum accessLevel = null; + + public InlineResponse200 userId(Long userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + **/ + @Schema(description = "") + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public InlineResponse200 projectId(Long projectId) { + this.projectId = projectId; + return this; + } + + /** + * Get projectId + * @return projectId + **/ + @Schema(description = "") + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public InlineResponse200 accessLevel(AccessLevelEnum accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + /** + * Get accessLevel + * @return accessLevel + **/ + @Schema(description = "") + public AccessLevelEnum getAccessLevel() { + return accessLevel; + } + + public void setAccessLevel(AccessLevelEnum accessLevel) { + this.accessLevel = accessLevel; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineResponse200 inlineResponse200 = (InlineResponse200) o; + return Objects.equals(this.userId, inlineResponse200.userId) && + Objects.equals(this.projectId, inlineResponse200.projectId) && + Objects.equals(this.accessLevel, inlineResponse200.accessLevel); + } + + @Override + public int hashCode() { + return Objects.hash(userId, projectId, accessLevel); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineResponse200 {\n"); + + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" accessLevel: ").append(toIndentedString(accessLevel)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/Java/src/main/java/io/swagger/client/model/Integration.java b/Java/src/main/java/io/swagger/client/model/Integration.java index 00b61d4..12ab8e2 100644 --- a/Java/src/main/java/io/swagger/client/model/Integration.java +++ b/Java/src/main/java/io/swagger/client/model/Integration.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -21,7 +21,7 @@ * Integration */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class Integration extends ArrayList { @Override diff --git a/Java/src/main/java/io/swagger/client/model/IntegrationInner.java b/Java/src/main/java/io/swagger/client/model/IntegrationInner.java index c099e13..657bb35 100644 --- a/Java/src/main/java/io/swagger/client/model/IntegrationInner.java +++ b/Java/src/main/java/io/swagger/client/model/IntegrationInner.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * IntegrationInner */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class IntegrationInner { @SerializedName("name") private String name = null; diff --git a/Java/src/main/java/io/swagger/client/model/Issue.java b/Java/src/main/java/io/swagger/client/model/Issue.java index f6d0ff2..e15beae 100644 --- a/Java/src/main/java/io/swagger/client/model/Issue.java +++ b/Java/src/main/java/io/swagger/client/model/Issue.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -31,7 +31,7 @@ * Issue */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class Issue { @SerializedName("id") private Integer id = null; diff --git a/Java/src/main/java/io/swagger/client/model/IssueAssignee.java b/Java/src/main/java/io/swagger/client/model/IssueAssignee.java index edc98c6..5af1a5f 100644 --- a/Java/src/main/java/io/swagger/client/model/IssueAssignee.java +++ b/Java/src/main/java/io/swagger/client/model/IssueAssignee.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * IssueAssignee */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class IssueAssignee { @SerializedName("id") private Integer id = null; diff --git a/Java/src/main/java/io/swagger/client/model/IssueLabels.java b/Java/src/main/java/io/swagger/client/model/IssueLabels.java index 891a88f..7d3f50c 100644 --- a/Java/src/main/java/io/swagger/client/model/IssueLabels.java +++ b/Java/src/main/java/io/swagger/client/model/IssueLabels.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * IssueLabels */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class IssueLabels { @SerializedName("id") private Integer id = null; diff --git a/Java/src/main/java/io/swagger/client/model/IssueMilestone.java b/Java/src/main/java/io/swagger/client/model/IssueMilestone.java index 88455ba..ae8d113 100644 --- a/Java/src/main/java/io/swagger/client/model/IssueMilestone.java +++ b/Java/src/main/java/io/swagger/client/model/IssueMilestone.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * IssueMilestone */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class IssueMilestone { @SerializedName("id") private Integer id = null; diff --git a/Java/src/main/java/io/swagger/client/model/Issues.java b/Java/src/main/java/io/swagger/client/model/Issues.java index d8a9cef..58d465c 100644 --- a/Java/src/main/java/io/swagger/client/model/Issues.java +++ b/Java/src/main/java/io/swagger/client/model/Issues.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -21,7 +21,7 @@ * Issues */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class Issues extends ArrayList { @Override diff --git a/Java/src/main/java/io/swagger/client/model/LabelStudioProjectAccess.java b/Java/src/main/java/io/swagger/client/model/LabelStudioProjectAccess.java new file mode 100644 index 0000000..78fe125 --- /dev/null +++ b/Java/src/main/java/io/swagger/client/model/LabelStudioProjectAccess.java @@ -0,0 +1,294 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.client.model.User; +import io.swagger.v3.oas.annotations.media.Schema; +import java.io.IOException; +/** + * LabelStudioProjectAccess + */ + +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") +public class LabelStudioProjectAccess { + @SerializedName("id") + private Long id = null; + + @SerializedName("repo_id") + private Long repoId = null; + + @SerializedName("project_id") + private Long projectId = null; + + @SerializedName("user_id") + private Long userId = null; + + @SerializedName("team_id") + private Long teamId = null; + + /** + * Gets or Sets accessLevel + */ + @JsonAdapter(AccessLevelEnum.Adapter.class) + public enum AccessLevelEnum { + NONE("none"), + ANNOTATOR("annotator"); + + private String value; + + AccessLevelEnum(String value) { + this.value = value; + } + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + public static AccessLevelEnum fromValue(String input) { + for (AccessLevelEnum b : AccessLevelEnum.values()) { + if (b.value.equals(input)) { + return b; + } + } + return null; + } + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final AccessLevelEnum enumeration) throws IOException { + jsonWriter.value(String.valueOf(enumeration.getValue())); + } + + @Override + public AccessLevelEnum read(final JsonReader jsonReader) throws IOException { + Object value = jsonReader.nextString(); + return AccessLevelEnum.fromValue((String)(value)); + } + } + } @SerializedName("access_level") + private AccessLevelEnum accessLevel = null; + + @SerializedName("created_unix") + private Long createdUnix = null; + + @SerializedName("user") + private User user = null; + + public LabelStudioProjectAccess id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @Schema(description = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public LabelStudioProjectAccess repoId(Long repoId) { + this.repoId = repoId; + return this; + } + + /** + * Get repoId + * @return repoId + **/ + @Schema(description = "") + public Long getRepoId() { + return repoId; + } + + public void setRepoId(Long repoId) { + this.repoId = repoId; + } + + public LabelStudioProjectAccess projectId(Long projectId) { + this.projectId = projectId; + return this; + } + + /** + * Project ID, -1 means wildcard access to all projects + * @return projectId + **/ + @Schema(description = "Project ID, -1 means wildcard access to all projects") + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public LabelStudioProjectAccess userId(Long userId) { + this.userId = userId; + return this; + } + + /** + * User ID (present for user access entries) + * @return userId + **/ + @Schema(description = "User ID (present for user access entries)") + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public LabelStudioProjectAccess teamId(Long teamId) { + this.teamId = teamId; + return this; + } + + /** + * Team ID (present for team access entries) + * @return teamId + **/ + @Schema(description = "Team ID (present for team access entries)") + public Long getTeamId() { + return teamId; + } + + public void setTeamId(Long teamId) { + this.teamId = teamId; + } + + public LabelStudioProjectAccess accessLevel(AccessLevelEnum accessLevel) { + this.accessLevel = accessLevel; + return this; + } + + /** + * Get accessLevel + * @return accessLevel + **/ + @Schema(description = "") + public AccessLevelEnum getAccessLevel() { + return accessLevel; + } + + public void setAccessLevel(AccessLevelEnum accessLevel) { + this.accessLevel = accessLevel; + } + + public LabelStudioProjectAccess createdUnix(Long createdUnix) { + this.createdUnix = createdUnix; + return this; + } + + /** + * Get createdUnix + * @return createdUnix + **/ + @Schema(description = "") + public Long getCreatedUnix() { + return createdUnix; + } + + public void setCreatedUnix(Long createdUnix) { + this.createdUnix = createdUnix; + } + + public LabelStudioProjectAccess user(User user) { + this.user = user; + return this; + } + + /** + * Get user + * @return user + **/ + @Schema(description = "") + public User getUser() { + return user; + } + + public void setUser(User user) { + this.user = user; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LabelStudioProjectAccess labelStudioProjectAccess = (LabelStudioProjectAccess) o; + return Objects.equals(this.id, labelStudioProjectAccess.id) && + Objects.equals(this.repoId, labelStudioProjectAccess.repoId) && + Objects.equals(this.projectId, labelStudioProjectAccess.projectId) && + Objects.equals(this.userId, labelStudioProjectAccess.userId) && + Objects.equals(this.teamId, labelStudioProjectAccess.teamId) && + Objects.equals(this.accessLevel, labelStudioProjectAccess.accessLevel) && + Objects.equals(this.createdUnix, labelStudioProjectAccess.createdUnix) && + Objects.equals(this.user, labelStudioProjectAccess.user); + } + + @Override + public int hashCode() { + return Objects.hash(id, repoId, projectId, userId, teamId, accessLevel, createdUnix, user); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LabelStudioProjectAccess {\n"); + + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" repoId: ").append(toIndentedString(repoId)).append("\n"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" teamId: ").append(toIndentedString(teamId)).append("\n"); + sb.append(" accessLevel: ").append(toIndentedString(accessLevel)).append("\n"); + sb.append(" createdUnix: ").append(toIndentedString(createdUnix)).append("\n"); + sb.append(" user: ").append(toIndentedString(user)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/Java/src/main/java/io/swagger/client/model/Labels.java b/Java/src/main/java/io/swagger/client/model/Labels.java index 03a4d0d..0a3db12 100644 --- a/Java/src/main/java/io/swagger/client/model/Labels.java +++ b/Java/src/main/java/io/swagger/client/model/Labels.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -21,7 +21,7 @@ * Labels **ID** to associate with this issue. **Note:** Only users with write access can set labels for new issues. Labels are silently dropped otherwise. */ @Schema(description = "Labels **ID** to associate with this issue. **Note:** Only users with write access can set labels for new issues. Labels are silently dropped otherwise.") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class Labels extends ArrayList { @Override diff --git a/Java/src/main/java/io/swagger/client/model/MigrateRepo.java b/Java/src/main/java/io/swagger/client/model/MigrateRepo.java index 4dddc59..6aec760 100644 --- a/Java/src/main/java/io/swagger/client/model/MigrateRepo.java +++ b/Java/src/main/java/io/swagger/client/model/MigrateRepo.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * MigrateRepo */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class MigrateRepo { @SerializedName("clone_addr") private String cloneAddr = null; diff --git a/Java/src/main/java/io/swagger/client/model/PatchIssue.java b/Java/src/main/java/io/swagger/client/model/PatchIssue.java index b3eeecd..e00e6c2 100644 --- a/Java/src/main/java/io/swagger/client/model/PatchIssue.java +++ b/Java/src/main/java/io/swagger/client/model/PatchIssue.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -26,7 +26,7 @@ * PatchIssue */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class PatchIssue { @SerializedName("title") private String title = null; diff --git a/Java/src/main/java/io/swagger/client/model/PostIssue.java b/Java/src/main/java/io/swagger/client/model/PostIssue.java index 821b5ed..53bcc32 100644 --- a/Java/src/main/java/io/swagger/client/model/PostIssue.java +++ b/Java/src/main/java/io/swagger/client/model/PostIssue.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -26,7 +26,7 @@ * PostIssue */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class PostIssue { @SerializedName("title") private String title = null; diff --git a/Java/src/main/java/io/swagger/client/model/PutFile.java b/Java/src/main/java/io/swagger/client/model/PutFile.java index 38740b7..8ecf0ed 100644 --- a/Java/src/main/java/io/swagger/client/model/PutFile.java +++ b/Java/src/main/java/io/swagger/client/model/PutFile.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * PutFile */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class PutFile { @SerializedName("commit_summary") private String commitSummary = null; diff --git a/Java/src/main/java/io/swagger/client/model/RepoHooksBody.java b/Java/src/main/java/io/swagger/client/model/RepoHooksBody.java index 5a82f3f..dd0fae5 100644 --- a/Java/src/main/java/io/swagger/client/model/RepoHooksBody.java +++ b/Java/src/main/java/io/swagger/client/model/RepoHooksBody.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,7 +27,7 @@ * RepoHooksBody */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class RepoHooksBody { /** * The type of webhook diff --git a/Java/src/main/java/io/swagger/client/model/State.java b/Java/src/main/java/io/swagger/client/model/State.java index 5a54cfe..91eaf15 100644 --- a/Java/src/main/java/io/swagger/client/model/State.java +++ b/Java/src/main/java/io/swagger/client/model/State.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/main/java/io/swagger/client/model/User.java b/Java/src/main/java/io/swagger/client/model/User.java index 3c73a31..5539477 100644 --- a/Java/src/main/java/io/swagger/client/model/User.java +++ b/Java/src/main/java/io/swagger/client/model/User.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * User */ -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class User { @SerializedName("id") private Integer id = null; diff --git a/Java/src/main/java/io/swagger/client/model/WebhookConfig.java b/Java/src/main/java/io/swagger/client/model/WebhookConfig.java index 5eed4cd..5c53738 100644 --- a/Java/src/main/java/io/swagger/client/model/WebhookConfig.java +++ b/Java/src/main/java/io/swagger/client/model/WebhookConfig.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -25,7 +25,7 @@ * Key/value pairs to provide settings for this hook */ @Schema(description = "Key/value pairs to provide settings for this hook") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class WebhookConfig { @SerializedName("url") private String url = null; diff --git a/Java/src/main/java/io/swagger/client/model/WebhookEvents.java b/Java/src/main/java/io/swagger/client/model/WebhookEvents.java index a05aaa0..d1403b8 100644 --- a/Java/src/main/java/io/swagger/client/model/WebhookEvents.java +++ b/Java/src/main/java/io/swagger/client/model/WebhookEvents.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -21,7 +21,7 @@ * Determines what events the hook is triggered format. */ @Schema(description = "Determines what events the hook is triggered format.") -@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2023-05-11T11:41:48.085831Z[Etc/UTC]") +@javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.JavaClientCodegen", date = "2026-01-28T08:00:41.951499729Z[Etc/UTC]") public class WebhookEvents extends ArrayList { @Override diff --git a/Java/src/test/java/io/swagger/client/api/AnnotationsApiTest.java b/Java/src/test/java/io/swagger/client/api/AnnotationsApiTest.java new file mode 100644 index 0000000..7905d13 --- /dev/null +++ b/Java/src/test/java/io/swagger/client/api/AnnotationsApiTest.java @@ -0,0 +1,178 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.api; + +import io.swagger.client.model.GrantLabelStudioAccess; +import io.swagger.client.model.InlineResponse200; +import io.swagger.client.model.LabelStudioProjectAccess; +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * API tests for AnnotationsApi + */ +@Ignore +public class AnnotationsApiTest { + + private final AnnotationsApi api = new AnnotationsApi(); + + /** + * Get team access level for annotation projects + * + * Get the access level for a specific team and project (or all projects) + * + * @throws Exception + * if the Api call fails + */ + @Test + public void getLabelStudioTeamAccessTest() throws Exception { + String owner = null; + String repo = null; + Long teamid = null; + Long projectId = null; + LabelStudioProjectAccess response = api.getLabelStudioTeamAccess(owner, repo, teamid, projectId); + + // TODO: test validations + } + /** + * Get user access level for annotation projects + * + * Get the access level for a specific user and project (or all projects) + * + * @throws Exception + * if the Api call fails + */ + @Test + public void getLabelStudioUserAccessTest() throws Exception { + String owner = null; + String repo = null; + Long userid = null; + Long projectId = null; + InlineResponse200 response = api.getLabelStudioUserAccess(owner, repo, userid, projectId); + + // TODO: test validations + } + /** + * Grant team access to annotation projects + * + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * + * @throws Exception + * if the Api call fails + */ + @Test + public void grantLabelStudioTeamAccessTest() throws Exception { + GrantLabelStudioAccess body = null; + String owner = null; + String repo = null; + Long teamid = null; + api.grantLabelStudioTeamAccess(body, owner, repo, teamid); + + // TODO: test validations + } + /** + * Grant user access to annotation projects + * + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * + * @throws Exception + * if the Api call fails + */ + @Test + public void grantLabelStudioUserAccessTest() throws Exception { + GrantLabelStudioAccess body = null; + String owner = null; + String repo = null; + Long userid = null; + api.grantLabelStudioUserAccess(body, owner, repo, userid); + + // TODO: test validations + } + /** + * List team access entries for annotation projects + * + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * + * @throws Exception + * if the Api call fails + */ + @Test + public void listLabelStudioTeamAccessTest() throws Exception { + String owner = null; + String repo = null; + Long projectId = null; + List response = api.listLabelStudioTeamAccess(owner, repo, projectId); + + // TODO: test validations + } + /** + * List user access entries for annotation projects + * + * Get a list of users with access to Label Studio annotation projects in the repository + * + * @throws Exception + * if the Api call fails + */ + @Test + public void listLabelStudioUserAccessTest() throws Exception { + String owner = null; + String repo = null; + Long projectId = null; + List response = api.listLabelStudioUserAccess(owner, repo, projectId); + + // TODO: test validations + } + /** + * Revoke team access to annotation projects + * + * Revoke a team's access to Label Studio annotation projects + * + * @throws Exception + * if the Api call fails + */ + @Test + public void revokeLabelStudioTeamAccessTest() throws Exception { + String owner = null; + String repo = null; + Long teamid = null; + Long projectId = null; + api.revokeLabelStudioTeamAccess(owner, repo, teamid, projectId); + + // TODO: test validations + } + /** + * Revoke user access to annotation projects + * + * Revoke a user's access to Label Studio annotation projects + * + * @throws Exception + * if the Api call fails + */ + @Test + public void revokeLabelStudioUserAccessTest() throws Exception { + String owner = null; + String repo = null; + Long userid = null; + Long projectId = null; + api.revokeLabelStudioUserAccess(owner, repo, userid, projectId); + + // TODO: test validations + } +} diff --git a/Java/src/test/java/io/swagger/client/api/BranchesApiTest.java b/Java/src/test/java/io/swagger/client/api/BranchesApiTest.java index 0c1c255..6ef9ffd 100644 --- a/Java/src/test/java/io/swagger/client/api/BranchesApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/BranchesApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/test/java/io/swagger/client/api/CollaboratorsApiTest.java b/Java/src/test/java/io/swagger/client/api/CollaboratorsApiTest.java index 30953b7..a305b94 100644 --- a/Java/src/test/java/io/swagger/client/api/CollaboratorsApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/CollaboratorsApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/test/java/io/swagger/client/api/CommitsApiTest.java b/Java/src/test/java/io/swagger/client/api/CommitsApiTest.java index a374165..5596cd5 100644 --- a/Java/src/test/java/io/swagger/client/api/CommitsApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/CommitsApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/test/java/io/swagger/client/api/ContentApiTest.java b/Java/src/test/java/io/swagger/client/api/ContentApiTest.java index 3e08a21..ffcb6c7 100644 --- a/Java/src/test/java/io/swagger/client/api/ContentApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/ContentApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/test/java/io/swagger/client/api/ExperimentsApiTest.java b/Java/src/test/java/io/swagger/client/api/ExperimentsApiTest.java index 99d18ae..f04b207 100644 --- a/Java/src/test/java/io/swagger/client/api/ExperimentsApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/ExperimentsApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/test/java/io/swagger/client/api/IssuesApiTest.java b/Java/src/test/java/io/swagger/client/api/IssuesApiTest.java index 7600c3b..85b61ce 100644 --- a/Java/src/test/java/io/swagger/client/api/IssuesApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/IssuesApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/test/java/io/swagger/client/api/OrganizationsApiTest.java b/Java/src/test/java/io/swagger/client/api/OrganizationsApiTest.java new file mode 100644 index 0000000..7fbd72f --- /dev/null +++ b/Java/src/test/java/io/swagger/client/api/OrganizationsApiTest.java @@ -0,0 +1,50 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +package io.swagger.client.api; + +import io.swagger.client.model.CreateAnnotatorTeam; +import org.junit.Test; +import org.junit.Ignore; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * API tests for OrganizationsApi + */ +@Ignore +public class OrganizationsApiTest { + + private final OrganizationsApi api = new OrganizationsApi(); + + /** + * Create an organization team + * + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * + * @throws Exception + * if the Api call fails + */ + @Test + public void createOrgTeamTest() throws Exception { + CreateAnnotatorTeam body = null; + String orgname = null; + api.createOrgTeam(body, orgname); + + // TODO: test validations + } +} diff --git a/Java/src/test/java/io/swagger/client/api/ReleasesApiTest.java b/Java/src/test/java/io/swagger/client/api/ReleasesApiTest.java index 22f29ba..c9ea274 100644 --- a/Java/src/test/java/io/swagger/client/api/ReleasesApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/ReleasesApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/test/java/io/swagger/client/api/RepositoryApiTest.java b/Java/src/test/java/io/swagger/client/api/RepositoryApiTest.java index 99f9660..12afdc8 100644 --- a/Java/src/test/java/io/swagger/client/api/RepositoryApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/RepositoryApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/test/java/io/swagger/client/api/StorageIntegrationsApiTest.java b/Java/src/test/java/io/swagger/client/api/StorageIntegrationsApiTest.java index 2e2a999..fbd9cb2 100644 --- a/Java/src/test/java/io/swagger/client/api/StorageIntegrationsApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/StorageIntegrationsApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -49,8 +49,9 @@ public void getBucketContentTest() throws Exception { String path = null; Boolean includeSize = null; Integer limit = null; + Boolean paging = null; String fromToken = null; - Files1 response = api.getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken); + Files1 response = api.getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken); // TODO: test validations } diff --git a/Java/src/test/java/io/swagger/client/api/UserApiTest.java b/Java/src/test/java/io/swagger/client/api/UserApiTest.java index d89c88b..4eee22e 100644 --- a/Java/src/test/java/io/swagger/client/api/UserApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/UserApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Java/src/test/java/io/swagger/client/api/WebhooksApiTest.java b/Java/src/test/java/io/swagger/client/api/WebhooksApiTest.java index 84fe4c3..1710feb 100644 --- a/Java/src/test/java/io/swagger/client/api/WebhooksApiTest.java +++ b/Java/src/test/java/io/swagger/client/api/WebhooksApiTest.java @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/JavaScript/README.md b/JavaScript/README.md index 9ebca43..a791fff 100644 --- a/JavaScript/README.md +++ b/JavaScript/README.md @@ -4,8 +4,8 @@ DagsHubApi - JavaScript client for dags_hub_api This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API version: 1.0.2 -- Package version: 1.0.2 +- API version: 1.0.3 +- Package version: 1.0.3 - Build package: io.swagger.codegen.v3.generators.javascript.JavaScriptClientCodegen ## Installation @@ -81,19 +81,21 @@ tokenAuth.apiKey = "YOUR API KEY" // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) //tokenAuth.apiKeyPrefix['token'] = "Token" -var api = new DagsHubApi.BranchesApi() +var api = new DagsHubApi.AnnotationsApi() var owner = "owner_example"; // {String} owner of the repository var repo = "repo_example"; // {String} name of the repository -var branch = "branch_example"; // {String} branch of the repository - +var teamid = 789; // {Number} Team ID +var opts = { + 'projectId': 789 // {Number} Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +}; var callback = function(error, data, response) { if (error) { console.error(error); } else { - console.log('API called successfully.'); + console.log('API called successfully. Returned data: ' + data); } }; -api.getBranch(owner, repo, branch, callback); +api.getLabelStudioTeamAccess(owner, repo, teamid, opts, callback); ``` ## Documentation for API Endpoints @@ -102,6 +104,14 @@ All URIs are relative to *https://dagshub.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*DagsHubApi.AnnotationsApi* | [**getLabelStudioTeamAccess**](docs/AnnotationsApi.md#getLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +*DagsHubApi.AnnotationsApi* | [**getLabelStudioUserAccess**](docs/AnnotationsApi.md#getLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +*DagsHubApi.AnnotationsApi* | [**grantLabelStudioTeamAccess**](docs/AnnotationsApi.md#grantLabelStudioTeamAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +*DagsHubApi.AnnotationsApi* | [**grantLabelStudioUserAccess**](docs/AnnotationsApi.md#grantLabelStudioUserAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +*DagsHubApi.AnnotationsApi* | [**listLabelStudioTeamAccess**](docs/AnnotationsApi.md#listLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +*DagsHubApi.AnnotationsApi* | [**listLabelStudioUserAccess**](docs/AnnotationsApi.md#listLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +*DagsHubApi.AnnotationsApi* | [**revokeLabelStudioTeamAccess**](docs/AnnotationsApi.md#revokeLabelStudioTeamAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +*DagsHubApi.AnnotationsApi* | [**revokeLabelStudioUserAccess**](docs/AnnotationsApi.md#revokeLabelStudioUserAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects *DagsHubApi.BranchesApi* | [**getBranch**](docs/BranchesApi.md#getBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch *DagsHubApi.BranchesApi* | [**listBranches**](docs/BranchesApi.md#listBranches) | **GET** /repos/{owner}/{repo}/branches | List Branches *DagsHubApi.CollaboratorsApi* | [**addCollaborator**](docs/CollaboratorsApi.md#addCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator @@ -122,6 +132,7 @@ Class | Method | HTTP request | Description *DagsHubApi.IssuesApi* | [**editIssue**](docs/IssuesApi.md#editIssue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue *DagsHubApi.IssuesApi* | [**getIssue**](docs/IssuesApi.md#getIssue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue *DagsHubApi.IssuesApi* | [**listRepoIssues**](docs/IssuesApi.md#listRepoIssues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository +*DagsHubApi.OrganizationsApi* | [**createOrgTeam**](docs/OrganizationsApi.md#createOrgTeam) | **POST** /admin/orgs/{orgname}/teams | Create an organization team *DagsHubApi.ReleasesApi* | [**listReleases**](docs/ReleasesApi.md#listReleases) | **GET** /repos/{owner}/{repo}/releases | List Releases *DagsHubApi.RepositoryApi* | [**createOrgRepo**](docs/RepositoryApi.md#createOrgRepo) | **POST** /org/{orgname}/repos | Create in organization *DagsHubApi.RepositoryApi* | [**createRepo**](docs/RepositoryApi.md#createRepo) | **POST** /user/repos | Create @@ -147,13 +158,16 @@ Class | Method | HTTP request | Description - [DagsHubApi.Body](docs/Body.md) - [DagsHubApi.Closed](docs/Closed.md) - [DagsHubApi.CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) + - [DagsHubApi.CreateAnnotatorTeam](docs/CreateAnnotatorTeam.md) - [DagsHubApi.CreateRepo](docs/CreateRepo.md) - [DagsHubApi.EditExperimentPost](docs/EditExperimentPost.md) - [DagsHubApi.ExperimentKeys](docs/ExperimentKeys.md) - [DagsHubApi.File](docs/File.md) - [DagsHubApi.Files](docs/Files.md) - [DagsHubApi.Files1](docs/Files1.md) + - [DagsHubApi.GrantLabelStudioAccess](docs/GrantLabelStudioAccess.md) - [DagsHubApi.HooksIdBody](docs/HooksIdBody.md) + - [DagsHubApi.InlineResponse200](docs/InlineResponse200.md) - [DagsHubApi.Integration](docs/Integration.md) - [DagsHubApi.IntegrationInner](docs/IntegrationInner.md) - [DagsHubApi.Issue](docs/Issue.md) @@ -161,6 +175,7 @@ Class | Method | HTTP request | Description - [DagsHubApi.IssueLabels](docs/IssueLabels.md) - [DagsHubApi.IssueMilestone](docs/IssueMilestone.md) - [DagsHubApi.Issues](docs/Issues.md) + - [DagsHubApi.LabelStudioProjectAccess](docs/LabelStudioProjectAccess.md) - [DagsHubApi.Labels](docs/Labels.md) - [DagsHubApi.MigrateRepo](docs/MigrateRepo.md) - [DagsHubApi.Milestone](docs/Milestone.md) diff --git a/JavaScript/docs/AnnotationsApi.md b/JavaScript/docs/AnnotationsApi.md new file mode 100644 index 0000000..f9626d2 --- /dev/null +++ b/JavaScript/docs/AnnotationsApi.md @@ -0,0 +1,497 @@ +# DagsHubApi.AnnotationsApi + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getLabelStudioTeamAccess**](AnnotationsApi.md#getLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +[**getLabelStudioUserAccess**](AnnotationsApi.md#getLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +[**grantLabelStudioTeamAccess**](AnnotationsApi.md#grantLabelStudioTeamAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +[**grantLabelStudioUserAccess**](AnnotationsApi.md#grantLabelStudioUserAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +[**listLabelStudioTeamAccess**](AnnotationsApi.md#listLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +[**listLabelStudioUserAccess**](AnnotationsApi.md#listLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +[**revokeLabelStudioTeamAccess**](AnnotationsApi.md#revokeLabelStudioTeamAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +[**revokeLabelStudioUserAccess**](AnnotationsApi.md#revokeLabelStudioUserAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects + + +# **getLabelStudioTeamAccess** +> LabelStudioProjectAccess getLabelStudioTeamAccess(owner, repo, teamid, opts) + +Get team access level for annotation projects + +Get the access level for a specific team and project (or all projects) + +### Example +```javascript +import {DagsHubApi} from 'dags_hub_api'; +let defaultClient = DagsHubApi.ApiClient.instance; +// Configure HTTP basic authorization: basicAuth +let basicAuth = defaultClient.authentications['basicAuth']; +basicAuth.username = 'YOUR USERNAME'; +basicAuth.password = 'YOUR PASSWORD'; + +// Configure API key authorization: tokenAuth +let tokenAuth = defaultClient.authentications['tokenAuth']; +tokenAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.apiKeyPrefix = 'Token'; + +let apiInstance = new DagsHubApi.AnnotationsApi(); +let owner = "owner_example"; // String | owner of the repository +let repo = "repo_example"; // String | name of the repository +let teamid = 789; // Number | Team ID +let opts = { + 'projectId': 789 // Number | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +}; +apiInstance.getLabelStudioTeamAccess(owner, repo, teamid, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **teamid** | **Number**| Team ID | + **projectId** | **Number**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**LabelStudioProjectAccess**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getLabelStudioUserAccess** +> InlineResponse200 getLabelStudioUserAccess(owner, repo, userid, opts) + +Get user access level for annotation projects + +Get the access level for a specific user and project (or all projects) + +### Example +```javascript +import {DagsHubApi} from 'dags_hub_api'; +let defaultClient = DagsHubApi.ApiClient.instance; +// Configure HTTP basic authorization: basicAuth +let basicAuth = defaultClient.authentications['basicAuth']; +basicAuth.username = 'YOUR USERNAME'; +basicAuth.password = 'YOUR PASSWORD'; + +// Configure API key authorization: tokenAuth +let tokenAuth = defaultClient.authentications['tokenAuth']; +tokenAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.apiKeyPrefix = 'Token'; + +let apiInstance = new DagsHubApi.AnnotationsApi(); +let owner = "owner_example"; // String | owner of the repository +let repo = "repo_example"; // String | name of the repository +let userid = 789; // Number | User ID +let opts = { + 'projectId': 789 // Number | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +}; +apiInstance.getLabelStudioUserAccess(owner, repo, userid, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **userid** | **Number**| User ID | + **projectId** | **Number**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **grantLabelStudioTeamAccess** +> grantLabelStudioTeamAccess(body, owner, repo, teamid) + +Grant team access to annotation projects + +Grant a team access to specific Label Studio annotation projects (organization repositories only) + +### Example +```javascript +import {DagsHubApi} from 'dags_hub_api'; +let defaultClient = DagsHubApi.ApiClient.instance; +// Configure HTTP basic authorization: basicAuth +let basicAuth = defaultClient.authentications['basicAuth']; +basicAuth.username = 'YOUR USERNAME'; +basicAuth.password = 'YOUR PASSWORD'; + +// Configure API key authorization: tokenAuth +let tokenAuth = defaultClient.authentications['tokenAuth']; +tokenAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.apiKeyPrefix = 'Token'; + +let apiInstance = new DagsHubApi.AnnotationsApi(); +let body = new DagsHubApi.GrantLabelStudioAccess(); // GrantLabelStudioAccess | +let owner = "owner_example"; // String | owner of the repository +let repo = "repo_example"; // String | name of the repository +let teamid = 789; // Number | Team ID + +apiInstance.grantLabelStudioTeamAccess(body, owner, repo, teamid, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **teamid** | **Number**| Team ID | + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **grantLabelStudioUserAccess** +> grantLabelStudioUserAccess(body, owner, repo, userid) + +Grant user access to annotation projects + +Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + +### Example +```javascript +import {DagsHubApi} from 'dags_hub_api'; +let defaultClient = DagsHubApi.ApiClient.instance; +// Configure HTTP basic authorization: basicAuth +let basicAuth = defaultClient.authentications['basicAuth']; +basicAuth.username = 'YOUR USERNAME'; +basicAuth.password = 'YOUR PASSWORD'; + +// Configure API key authorization: tokenAuth +let tokenAuth = defaultClient.authentications['tokenAuth']; +tokenAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.apiKeyPrefix = 'Token'; + +let apiInstance = new DagsHubApi.AnnotationsApi(); +let body = new DagsHubApi.GrantLabelStudioAccess(); // GrantLabelStudioAccess | +let owner = "owner_example"; // String | owner of the repository +let repo = "repo_example"; // String | name of the repository +let userid = 789; // Number | User ID + +apiInstance.grantLabelStudioUserAccess(body, owner, repo, userid, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **userid** | **Number**| User ID | + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **listLabelStudioTeamAccess** +> [LabelStudioProjectAccess] listLabelStudioTeamAccess(owner, repo, opts) + +List team access entries for annotation projects + +Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + +### Example +```javascript +import {DagsHubApi} from 'dags_hub_api'; +let defaultClient = DagsHubApi.ApiClient.instance; +// Configure HTTP basic authorization: basicAuth +let basicAuth = defaultClient.authentications['basicAuth']; +basicAuth.username = 'YOUR USERNAME'; +basicAuth.password = 'YOUR PASSWORD'; + +// Configure API key authorization: tokenAuth +let tokenAuth = defaultClient.authentications['tokenAuth']; +tokenAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.apiKeyPrefix = 'Token'; + +let apiInstance = new DagsHubApi.AnnotationsApi(); +let owner = "owner_example"; // String | owner of the repository +let repo = "repo_example"; // String | name of the repository +let opts = { + 'projectId': 789 // Number | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +}; +apiInstance.listLabelStudioTeamAccess(owner, repo, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **projectId** | **Number**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**[LabelStudioProjectAccess]**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **listLabelStudioUserAccess** +> [LabelStudioProjectAccess] listLabelStudioUserAccess(owner, repo, opts) + +List user access entries for annotation projects + +Get a list of users with access to Label Studio annotation projects in the repository + +### Example +```javascript +import {DagsHubApi} from 'dags_hub_api'; +let defaultClient = DagsHubApi.ApiClient.instance; +// Configure HTTP basic authorization: basicAuth +let basicAuth = defaultClient.authentications['basicAuth']; +basicAuth.username = 'YOUR USERNAME'; +basicAuth.password = 'YOUR PASSWORD'; + +// Configure API key authorization: tokenAuth +let tokenAuth = defaultClient.authentications['tokenAuth']; +tokenAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.apiKeyPrefix = 'Token'; + +let apiInstance = new DagsHubApi.AnnotationsApi(); +let owner = "owner_example"; // String | owner of the repository +let repo = "repo_example"; // String | name of the repository +let opts = { + 'projectId': 789 // Number | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +}; +apiInstance.listLabelStudioUserAccess(owner, repo, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully. Returned data: ' + data); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **projectId** | **Number**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**[LabelStudioProjectAccess]**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **revokeLabelStudioTeamAccess** +> revokeLabelStudioTeamAccess(owner, repo, teamid, opts) + +Revoke team access to annotation projects + +Revoke a team's access to Label Studio annotation projects + +### Example +```javascript +import {DagsHubApi} from 'dags_hub_api'; +let defaultClient = DagsHubApi.ApiClient.instance; +// Configure HTTP basic authorization: basicAuth +let basicAuth = defaultClient.authentications['basicAuth']; +basicAuth.username = 'YOUR USERNAME'; +basicAuth.password = 'YOUR PASSWORD'; + +// Configure API key authorization: tokenAuth +let tokenAuth = defaultClient.authentications['tokenAuth']; +tokenAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.apiKeyPrefix = 'Token'; + +let apiInstance = new DagsHubApi.AnnotationsApi(); +let owner = "owner_example"; // String | owner of the repository +let repo = "repo_example"; // String | name of the repository +let teamid = 789; // Number | Team ID +let opts = { + 'projectId': 789 // Number | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +}; +apiInstance.revokeLabelStudioTeamAccess(owner, repo, teamid, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **teamid** | **Number**| Team ID | + **projectId** | **Number**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **revokeLabelStudioUserAccess** +> revokeLabelStudioUserAccess(owner, repo, userid, opts) + +Revoke user access to annotation projects + +Revoke a user's access to Label Studio annotation projects + +### Example +```javascript +import {DagsHubApi} from 'dags_hub_api'; +let defaultClient = DagsHubApi.ApiClient.instance; +// Configure HTTP basic authorization: basicAuth +let basicAuth = defaultClient.authentications['basicAuth']; +basicAuth.username = 'YOUR USERNAME'; +basicAuth.password = 'YOUR PASSWORD'; + +// Configure API key authorization: tokenAuth +let tokenAuth = defaultClient.authentications['tokenAuth']; +tokenAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.apiKeyPrefix = 'Token'; + +let apiInstance = new DagsHubApi.AnnotationsApi(); +let owner = "owner_example"; // String | owner of the repository +let repo = "repo_example"; // String | name of the repository +let userid = 789; // Number | User ID +let opts = { + 'projectId': 789 // Number | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +}; +apiInstance.revokeLabelStudioUserAccess(owner, repo, userid, opts, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **userid** | **Number**| User ID | + **projectId** | **Number**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + diff --git a/JavaScript/docs/CreateAnnotatorTeam.md b/JavaScript/docs/CreateAnnotatorTeam.md new file mode 100644 index 0000000..8713604 --- /dev/null +++ b/JavaScript/docs/CreateAnnotatorTeam.md @@ -0,0 +1,24 @@ +# DagsHubApi.CreateAnnotatorTeam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Team name | +**description** | **String** | Team description | [optional] +**teamType** | **String** | Type of team - normal teams have repository access, annotator teams only have annotation project access | [optional] [default to 'normal'] +**permission** | **String** | Repository permission level (required for normal teams, ignored for annotator teams) | [optional] + + +## Enum: TeamTypeEnum + +* `normal` (value: `"normal"`) +* `annotator` (value: `"annotator"`) + + + +## Enum: PermissionEnum + +* `read` (value: `"read"`) +* `write` (value: `"write"`) +* `admin` (value: `"admin"`) + diff --git a/JavaScript/docs/Files1.md b/JavaScript/docs/Files1.md index 4e5c6a8..42efe59 100644 --- a/JavaScript/docs/Files1.md +++ b/JavaScript/docs/Files1.md @@ -4,5 +4,4 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **entries** | **[File]** | | [optional] -**limit** | **Number** | | [optional] -**nextToken** | **String** | | [optional] +**nextToken** | **String** | Next token to continue pagination from | [optional] diff --git a/JavaScript/docs/GrantLabelStudioAccess.md b/JavaScript/docs/GrantLabelStudioAccess.md new file mode 100644 index 0000000..aabe298 --- /dev/null +++ b/JavaScript/docs/GrantLabelStudioAccess.md @@ -0,0 +1,14 @@ +# DagsHubApi.GrantLabelStudioAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**projectId** | **Number** | Project ID, -1 for wildcard access to all projects | +**accessLevel** | **String** | Access level to grant | [optional] [default to 'annotator'] + + +## Enum: AccessLevelEnum + +* `annotator` (value: `"annotator"`) +* `none` (value: `"none"`) + diff --git a/JavaScript/docs/InlineResponse200.md b/JavaScript/docs/InlineResponse200.md new file mode 100644 index 0000000..5b97194 --- /dev/null +++ b/JavaScript/docs/InlineResponse200.md @@ -0,0 +1,15 @@ +# DagsHubApi.InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userId** | **Number** | | [optional] +**projectId** | **Number** | | [optional] +**accessLevel** | **String** | | [optional] + + +## Enum: AccessLevelEnum + +* `none` (value: `"none"`) +* `annotator` (value: `"annotator"`) + diff --git a/JavaScript/docs/LabelStudioProjectAccess.md b/JavaScript/docs/LabelStudioProjectAccess.md new file mode 100644 index 0000000..eae1c55 --- /dev/null +++ b/JavaScript/docs/LabelStudioProjectAccess.md @@ -0,0 +1,20 @@ +# DagsHubApi.LabelStudioProjectAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Number** | | [optional] +**repoId** | **Number** | | [optional] +**projectId** | **Number** | Project ID, -1 means wildcard access to all projects | [optional] +**userId** | **Number** | User ID (present for user access entries) | [optional] +**teamId** | **Number** | Team ID (present for team access entries) | [optional] +**accessLevel** | **String** | | [optional] +**createdUnix** | **Number** | | [optional] +**user** | [**User**](User.md) | | [optional] + + +## Enum: AccessLevelEnum + +* `none` (value: `"none"`) +* `annotator` (value: `"annotator"`) + diff --git a/JavaScript/docs/OrganizationsApi.md b/JavaScript/docs/OrganizationsApi.md new file mode 100644 index 0000000..c37b2e5 --- /dev/null +++ b/JavaScript/docs/OrganizationsApi.md @@ -0,0 +1,64 @@ +# DagsHubApi.OrganizationsApi + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createOrgTeam**](OrganizationsApi.md#createOrgTeam) | **POST** /admin/orgs/{orgname}/teams | Create an organization team + + +# **createOrgTeam** +> createOrgTeam(body, orgname) + +Create an organization team + +Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + +### Example +```javascript +import {DagsHubApi} from 'dags_hub_api'; +let defaultClient = DagsHubApi.ApiClient.instance; +// Configure HTTP basic authorization: basicAuth +let basicAuth = defaultClient.authentications['basicAuth']; +basicAuth.username = 'YOUR USERNAME'; +basicAuth.password = 'YOUR PASSWORD'; + +// Configure API key authorization: tokenAuth +let tokenAuth = defaultClient.authentications['tokenAuth']; +tokenAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//tokenAuth.apiKeyPrefix = 'Token'; + +let apiInstance = new DagsHubApi.OrganizationsApi(); +let body = new DagsHubApi.CreateAnnotatorTeam(); // CreateAnnotatorTeam | +let orgname = "orgname_example"; // String | A DagsHub organization name + +apiInstance.createOrgTeam(body, orgname, (error, data, response) => { + if (error) { + console.error(error); + } else { + console.log('API called successfully.'); + } +}); +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateAnnotatorTeam**](CreateAnnotatorTeam.md)| | + **orgname** | **String**| A DagsHub organization name | + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + diff --git a/JavaScript/docs/StorageIntegrationsApi.md b/JavaScript/docs/StorageIntegrationsApi.md index 00779e9..e9ccc27 100644 --- a/JavaScript/docs/StorageIntegrationsApi.md +++ b/JavaScript/docs/StorageIntegrationsApi.md @@ -38,7 +38,8 @@ let path = "path_example"; // String | path of a folder in the repository let opts = { 'includeSize': false, // Boolean | 'limit': 100, // Number | Maximum amount of items to return - 'fromToken': "fromToken_example" // String | Token, from which to continue iteration + 'paging': false, // Boolean | Whether or not paging is enabled + 'fromToken': "fromToken_example" // String | [Only if paging is enabled] token, from which to continue iteration }; apiInstance.getBucketContent(owner, repo, protocol, bucket, path, opts, (error, data, response) => { if (error) { @@ -60,7 +61,8 @@ Name | Type | Description | Notes **path** | **String**| path of a folder in the repository | **includeSize** | **Boolean**| | [optional] [default to false] **limit** | **Number**| Maximum amount of items to return | [optional] [default to 100] - **fromToken** | **String**| Token, from which to continue iteration | [optional] + **paging** | **Boolean**| Whether or not paging is enabled | [optional] [default to false] + **fromToken** | **String**| [Only if paging is enabled] token, from which to continue iteration | [optional] ### Return type diff --git a/JavaScript/package.json b/JavaScript/package.json index 3fe6b1e..e55fd1d 100644 --- a/JavaScript/package.json +++ b/JavaScript/package.json @@ -1,6 +1,6 @@ { "name": "dags_hub_api", - "version": "1.0.2", + "version": "1.0.3", "description": "This_API_provides_a_way_to_retrive__interact_with_data_about_DagsHub_repositories_users_issues_webhooks_and_more_The_API_is_also_used_by_the__DagsHub_Direct_Data_Access_streaming_client_httpsgithub_comDagsHubclient_to_stream_content_from_a_repository_for_easier_and_faster_training_", "license": "Unlicense", "main": "src/index.js", diff --git a/JavaScript/src/ApiClient.js b/JavaScript/src/ApiClient.js index 32ef9e1..893dd3e 100644 --- a/JavaScript/src/ApiClient.js +++ b/JavaScript/src/ApiClient.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import querystring from "querystring"; /** * @module ApiClient -* @version 1.0.2 +* @version 1.0.3 */ /** diff --git a/JavaScript/src/api/AnnotationsApi.js b/JavaScript/src/api/AnnotationsApi.js new file mode 100644 index 0000000..9f6745a --- /dev/null +++ b/JavaScript/src/api/AnnotationsApi.js @@ -0,0 +1,504 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +import {ApiClient} from "../ApiClient"; +import {GrantLabelStudioAccess} from '../model/GrantLabelStudioAccess'; +import {InlineResponse200} from '../model/InlineResponse200'; +import {LabelStudioProjectAccess} from '../model/LabelStudioProjectAccess'; + +/** +* Annotations service. +* @module api/AnnotationsApi +* @version 1.0.3 +*/ +export class AnnotationsApi { + + /** + * Constructs a new AnnotationsApi. + * @alias module:api/AnnotationsApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instanc + e} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + /** + * Callback function to receive the result of the getLabelStudioTeamAccess operation. + * @callback moduleapi/AnnotationsApi~getLabelStudioTeamAccessCallback + * @param {String} error Error message, if any. + * @param {module:model/LabelStudioProjectAccess{ data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Get team access level for annotation projects + * Get the access level for a specific team and project (or all projects) + * @param {String} owner owner of the repository + * @param {String} repo name of the repository + * @param {Number} teamid Team ID + * @param {Object} opts Optional parameters + * @param {Number} opts.projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {module:api/AnnotationsApi~getLabelStudioTeamAccessCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} + */ + getLabelStudioTeamAccess(owner, repo, teamid, opts, callback) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'owner' is set + if (owner === undefined || owner === null) { + throw new Error("Missing the required parameter 'owner' when calling getLabelStudioTeamAccess"); + } + // verify the required parameter 'repo' is set + if (repo === undefined || repo === null) { + throw new Error("Missing the required parameter 'repo' when calling getLabelStudioTeamAccess"); + } + // verify the required parameter 'teamid' is set + if (teamid === undefined || teamid === null) { + throw new Error("Missing the required parameter 'teamid' when calling getLabelStudioTeamAccess"); + } + + let pathParams = { + 'owner': owner,'repo': repo,'teamid': teamid + }; + let queryParams = { + 'project_id': opts['projectId'] + }; + let headerParams = { + + }; + let formParams = { + + }; + + let authNames = ['basicAuth', 'tokenAuth']; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = LabelStudioProjectAccess; + + return this.apiClient.callApi( + '/repos/{owner}/{repo}/annotations/access/teams/{teamid}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + /** + * Callback function to receive the result of the getLabelStudioUserAccess operation. + * @callback moduleapi/AnnotationsApi~getLabelStudioUserAccessCallback + * @param {String} error Error message, if any. + * @param {module:model/InlineResponse200{ data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * Get user access level for annotation projects + * Get the access level for a specific user and project (or all projects) + * @param {String} owner owner of the repository + * @param {String} repo name of the repository + * @param {Number} userid User ID + * @param {Object} opts Optional parameters + * @param {Number} opts.projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {module:api/AnnotationsApi~getLabelStudioUserAccessCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} + */ + getLabelStudioUserAccess(owner, repo, userid, opts, callback) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'owner' is set + if (owner === undefined || owner === null) { + throw new Error("Missing the required parameter 'owner' when calling getLabelStudioUserAccess"); + } + // verify the required parameter 'repo' is set + if (repo === undefined || repo === null) { + throw new Error("Missing the required parameter 'repo' when calling getLabelStudioUserAccess"); + } + // verify the required parameter 'userid' is set + if (userid === undefined || userid === null) { + throw new Error("Missing the required parameter 'userid' when calling getLabelStudioUserAccess"); + } + + let pathParams = { + 'owner': owner,'repo': repo,'userid': userid + }; + let queryParams = { + 'project_id': opts['projectId'] + }; + let headerParams = { + + }; + let formParams = { + + }; + + let authNames = ['basicAuth', 'tokenAuth']; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = InlineResponse200; + + return this.apiClient.callApi( + '/repos/{owner}/{repo}/annotations/access/users/{userid}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + /** + * Callback function to receive the result of the grantLabelStudioTeamAccess operation. + * @callback moduleapi/AnnotationsApi~grantLabelStudioTeamAccessCallback + * @param {String} error Error message, if any. + * @param data This operation does not return a value. + * @param {String} response The complete HTTP response. + */ + + /** + * Grant team access to annotation projects + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * @param {module:model/GrantLabelStudioAccess} body + * @param {String} owner owner of the repository + * @param {String} repo name of the repository + * @param {Number} teamid Team ID + * @param {module:api/AnnotationsApi~grantLabelStudioTeamAccessCallback} callback The callback function, accepting three arguments: error, data, response + */ + grantLabelStudioTeamAccess(body, owner, repo, teamid, callback) { + + let postBody = body; + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling grantLabelStudioTeamAccess"); + } + // verify the required parameter 'owner' is set + if (owner === undefined || owner === null) { + throw new Error("Missing the required parameter 'owner' when calling grantLabelStudioTeamAccess"); + } + // verify the required parameter 'repo' is set + if (repo === undefined || repo === null) { + throw new Error("Missing the required parameter 'repo' when calling grantLabelStudioTeamAccess"); + } + // verify the required parameter 'teamid' is set + if (teamid === undefined || teamid === null) { + throw new Error("Missing the required parameter 'teamid' when calling grantLabelStudioTeamAccess"); + } + + let pathParams = { + 'owner': owner,'repo': repo,'teamid': teamid + }; + let queryParams = { + + }; + let headerParams = { + + }; + let formParams = { + + }; + + let authNames = ['basicAuth', 'tokenAuth']; + let contentTypes = ['application/json']; + let accepts = []; + let returnType = null; + + return this.apiClient.callApi( + '/repos/{owner}/{repo}/annotations/access/teams/{teamid}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + /** + * Callback function to receive the result of the grantLabelStudioUserAccess operation. + * @callback moduleapi/AnnotationsApi~grantLabelStudioUserAccessCallback + * @param {String} error Error message, if any. + * @param data This operation does not return a value. + * @param {String} response The complete HTTP response. + */ + + /** + * Grant user access to annotation projects + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * @param {module:model/GrantLabelStudioAccess} body + * @param {String} owner owner of the repository + * @param {String} repo name of the repository + * @param {Number} userid User ID + * @param {module:api/AnnotationsApi~grantLabelStudioUserAccessCallback} callback The callback function, accepting three arguments: error, data, response + */ + grantLabelStudioUserAccess(body, owner, repo, userid, callback) { + + let postBody = body; + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling grantLabelStudioUserAccess"); + } + // verify the required parameter 'owner' is set + if (owner === undefined || owner === null) { + throw new Error("Missing the required parameter 'owner' when calling grantLabelStudioUserAccess"); + } + // verify the required parameter 'repo' is set + if (repo === undefined || repo === null) { + throw new Error("Missing the required parameter 'repo' when calling grantLabelStudioUserAccess"); + } + // verify the required parameter 'userid' is set + if (userid === undefined || userid === null) { + throw new Error("Missing the required parameter 'userid' when calling grantLabelStudioUserAccess"); + } + + let pathParams = { + 'owner': owner,'repo': repo,'userid': userid + }; + let queryParams = { + + }; + let headerParams = { + + }; + let formParams = { + + }; + + let authNames = ['basicAuth', 'tokenAuth']; + let contentTypes = ['application/json']; + let accepts = []; + let returnType = null; + + return this.apiClient.callApi( + '/repos/{owner}/{repo}/annotations/access/users/{userid}', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + /** + * Callback function to receive the result of the listLabelStudioTeamAccess operation. + * @callback moduleapi/AnnotationsApi~listLabelStudioTeamAccessCallback + * @param {String} error Error message, if any. + * @param {Array.{ data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * List team access entries for annotation projects + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * @param {String} owner owner of the repository + * @param {String} repo name of the repository + * @param {Object} opts Optional parameters + * @param {Number} opts.projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {module:api/AnnotationsApi~listLabelStudioTeamAccessCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} + */ + listLabelStudioTeamAccess(owner, repo, opts, callback) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'owner' is set + if (owner === undefined || owner === null) { + throw new Error("Missing the required parameter 'owner' when calling listLabelStudioTeamAccess"); + } + // verify the required parameter 'repo' is set + if (repo === undefined || repo === null) { + throw new Error("Missing the required parameter 'repo' when calling listLabelStudioTeamAccess"); + } + + let pathParams = { + 'owner': owner,'repo': repo + }; + let queryParams = { + 'project_id': opts['projectId'] + }; + let headerParams = { + + }; + let formParams = { + + }; + + let authNames = ['basicAuth', 'tokenAuth']; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = [LabelStudioProjectAccess]; + + return this.apiClient.callApi( + '/repos/{owner}/{repo}/annotations/access/teams', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + /** + * Callback function to receive the result of the listLabelStudioUserAccess operation. + * @callback moduleapi/AnnotationsApi~listLabelStudioUserAccessCallback + * @param {String} error Error message, if any. + * @param {Array.{ data The data returned by the service call. + * @param {String} response The complete HTTP response. + */ + + /** + * List user access entries for annotation projects + * Get a list of users with access to Label Studio annotation projects in the repository + * @param {String} owner owner of the repository + * @param {String} repo name of the repository + * @param {Object} opts Optional parameters + * @param {Number} opts.projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {module:api/AnnotationsApi~listLabelStudioUserAccessCallback} callback The callback function, accepting three arguments: error, data, response + * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} + */ + listLabelStudioUserAccess(owner, repo, opts, callback) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'owner' is set + if (owner === undefined || owner === null) { + throw new Error("Missing the required parameter 'owner' when calling listLabelStudioUserAccess"); + } + // verify the required parameter 'repo' is set + if (repo === undefined || repo === null) { + throw new Error("Missing the required parameter 'repo' when calling listLabelStudioUserAccess"); + } + + let pathParams = { + 'owner': owner,'repo': repo + }; + let queryParams = { + 'project_id': opts['projectId'] + }; + let headerParams = { + + }; + let formParams = { + + }; + + let authNames = ['basicAuth', 'tokenAuth']; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = [LabelStudioProjectAccess]; + + return this.apiClient.callApi( + '/repos/{owner}/{repo}/annotations/access/users', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + /** + * Callback function to receive the result of the revokeLabelStudioTeamAccess operation. + * @callback moduleapi/AnnotationsApi~revokeLabelStudioTeamAccessCallback + * @param {String} error Error message, if any. + * @param data This operation does not return a value. + * @param {String} response The complete HTTP response. + */ + + /** + * Revoke team access to annotation projects + * Revoke a team's access to Label Studio annotation projects + * @param {String} owner owner of the repository + * @param {String} repo name of the repository + * @param {Number} teamid Team ID + * @param {Object} opts Optional parameters + * @param {Number} opts.projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {module:api/AnnotationsApi~revokeLabelStudioTeamAccessCallback} callback The callback function, accepting three arguments: error, data, response + */ + revokeLabelStudioTeamAccess(owner, repo, teamid, opts, callback) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'owner' is set + if (owner === undefined || owner === null) { + throw new Error("Missing the required parameter 'owner' when calling revokeLabelStudioTeamAccess"); + } + // verify the required parameter 'repo' is set + if (repo === undefined || repo === null) { + throw new Error("Missing the required parameter 'repo' when calling revokeLabelStudioTeamAccess"); + } + // verify the required parameter 'teamid' is set + if (teamid === undefined || teamid === null) { + throw new Error("Missing the required parameter 'teamid' when calling revokeLabelStudioTeamAccess"); + } + + let pathParams = { + 'owner': owner,'repo': repo,'teamid': teamid + }; + let queryParams = { + 'project_id': opts['projectId'] + }; + let headerParams = { + + }; + let formParams = { + + }; + + let authNames = ['basicAuth', 'tokenAuth']; + let contentTypes = []; + let accepts = []; + let returnType = null; + + return this.apiClient.callApi( + '/repos/{owner}/{repo}/annotations/access/teams/{teamid}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + /** + * Callback function to receive the result of the revokeLabelStudioUserAccess operation. + * @callback moduleapi/AnnotationsApi~revokeLabelStudioUserAccessCallback + * @param {String} error Error message, if any. + * @param data This operation does not return a value. + * @param {String} response The complete HTTP response. + */ + + /** + * Revoke user access to annotation projects + * Revoke a user's access to Label Studio annotation projects + * @param {String} owner owner of the repository + * @param {String} repo name of the repository + * @param {Number} userid User ID + * @param {Object} opts Optional parameters + * @param {Number} opts.projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {module:api/AnnotationsApi~revokeLabelStudioUserAccessCallback} callback The callback function, accepting three arguments: error, data, response + */ + revokeLabelStudioUserAccess(owner, repo, userid, opts, callback) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'owner' is set + if (owner === undefined || owner === null) { + throw new Error("Missing the required parameter 'owner' when calling revokeLabelStudioUserAccess"); + } + // verify the required parameter 'repo' is set + if (repo === undefined || repo === null) { + throw new Error("Missing the required parameter 'repo' when calling revokeLabelStudioUserAccess"); + } + // verify the required parameter 'userid' is set + if (userid === undefined || userid === null) { + throw new Error("Missing the required parameter 'userid' when calling revokeLabelStudioUserAccess"); + } + + let pathParams = { + 'owner': owner,'repo': repo,'userid': userid + }; + let queryParams = { + 'project_id': opts['projectId'] + }; + let headerParams = { + + }; + let formParams = { + + }; + + let authNames = ['basicAuth', 'tokenAuth']; + let contentTypes = []; + let accepts = []; + let returnType = null; + + return this.apiClient.callApi( + '/repos/{owner}/{repo}/annotations/access/users/{userid}', 'DELETE', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + +} \ No newline at end of file diff --git a/JavaScript/src/api/BranchesApi.js b/JavaScript/src/api/BranchesApi.js index 57a6960..6fb7088 100644 --- a/JavaScript/src/api/BranchesApi.js +++ b/JavaScript/src/api/BranchesApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from "../ApiClient"; /** * Branches service. * @module api/BranchesApi -* @version 1.0.2 +* @version 1.0.3 */ export class BranchesApi { diff --git a/JavaScript/src/api/CollaboratorsApi.js b/JavaScript/src/api/CollaboratorsApi.js index b92c286..532ff40 100644 --- a/JavaScript/src/api/CollaboratorsApi.js +++ b/JavaScript/src/api/CollaboratorsApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -18,7 +18,7 @@ import {CollaboratorsCollaboratorBody} from '../model/CollaboratorsCollaboratorB /** * Collaborators service. * @module api/CollaboratorsApi -* @version 1.0.2 +* @version 1.0.3 */ export class CollaboratorsApi { diff --git a/JavaScript/src/api/CommitsApi.js b/JavaScript/src/api/CommitsApi.js index 4ecb322..771b93f 100644 --- a/JavaScript/src/api/CommitsApi.js +++ b/JavaScript/src/api/CommitsApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from "../ApiClient"; /** * Commits service. * @module api/CommitsApi -* @version 1.0.2 +* @version 1.0.3 */ export class CommitsApi { diff --git a/JavaScript/src/api/ContentApi.js b/JavaScript/src/api/ContentApi.js index ed1a7cb..66b0ed8 100644 --- a/JavaScript/src/api/ContentApi.js +++ b/JavaScript/src/api/ContentApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -18,7 +18,7 @@ import {Files} from '../model/Files'; /** * Content service. * @module api/ContentApi -* @version 1.0.2 +* @version 1.0.3 */ export class ContentApi { diff --git a/JavaScript/src/api/ExperimentsApi.js b/JavaScript/src/api/ExperimentsApi.js index 8200745..9e5a608 100644 --- a/JavaScript/src/api/ExperimentsApi.js +++ b/JavaScript/src/api/ExperimentsApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -19,7 +19,7 @@ import {ExperimentKeys} from '../model/ExperimentKeys'; /** * Experiments service. * @module api/ExperimentsApi -* @version 1.0.2 +* @version 1.0.3 */ export class ExperimentsApi { diff --git a/JavaScript/src/api/IssuesApi.js b/JavaScript/src/api/IssuesApi.js index 0148856..eb9d02b 100644 --- a/JavaScript/src/api/IssuesApi.js +++ b/JavaScript/src/api/IssuesApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -21,7 +21,7 @@ import {PostIssue} from '../model/PostIssue'; /** * Issues service. * @module api/IssuesApi -* @version 1.0.2 +* @version 1.0.3 */ export class IssuesApi { diff --git a/JavaScript/src/api/OrganizationsApi.js b/JavaScript/src/api/OrganizationsApi.js new file mode 100644 index 0000000..74eed1f --- /dev/null +++ b/JavaScript/src/api/OrganizationsApi.js @@ -0,0 +1,89 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +import {ApiClient} from "../ApiClient"; +import {CreateAnnotatorTeam} from '../model/CreateAnnotatorTeam'; + +/** +* Organizations service. +* @module api/OrganizationsApi +* @version 1.0.3 +*/ +export class OrganizationsApi { + + /** + * Constructs a new OrganizationsApi. + * @alias module:api/OrganizationsApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instanc + e} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + /** + * Callback function to receive the result of the createOrgTeam operation. + * @callback moduleapi/OrganizationsApi~createOrgTeamCallback + * @param {String} error Error message, if any. + * @param data This operation does not return a value. + * @param {String} response The complete HTTP response. + */ + + /** + * Create an organization team + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * @param {module:model/CreateAnnotatorTeam} body + * @param {String} orgname A DagsHub organization name + * @param {module:api/OrganizationsApi~createOrgTeamCallback} callback The callback function, accepting three arguments: error, data, response + */ + createOrgTeam(body, orgname, callback) { + + let postBody = body; + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling createOrgTeam"); + } + // verify the required parameter 'orgname' is set + if (orgname === undefined || orgname === null) { + throw new Error("Missing the required parameter 'orgname' when calling createOrgTeam"); + } + + let pathParams = { + 'orgname': orgname + }; + let queryParams = { + + }; + let headerParams = { + + }; + let formParams = { + + }; + + let authNames = ['basicAuth', 'tokenAuth']; + let contentTypes = ['application/json']; + let accepts = []; + let returnType = null; + + return this.apiClient.callApi( + '/admin/orgs/{orgname}/teams', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, callback + ); + } + +} \ No newline at end of file diff --git a/JavaScript/src/api/ReleasesApi.js b/JavaScript/src/api/ReleasesApi.js index 637a680..912513b 100644 --- a/JavaScript/src/api/ReleasesApi.js +++ b/JavaScript/src/api/ReleasesApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from "../ApiClient"; /** * Releases service. * @module api/ReleasesApi -* @version 1.0.2 +* @version 1.0.3 */ export class ReleasesApi { diff --git a/JavaScript/src/api/RepositoryApi.js b/JavaScript/src/api/RepositoryApi.js index 270ebb8..ef58d8d 100644 --- a/JavaScript/src/api/RepositoryApi.js +++ b/JavaScript/src/api/RepositoryApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -19,7 +19,7 @@ import {MigrateRepo} from '../model/MigrateRepo'; /** * Repository service. * @module api/RepositoryApi -* @version 1.0.2 +* @version 1.0.3 */ export class RepositoryApi { diff --git a/JavaScript/src/api/StorageIntegrationsApi.js b/JavaScript/src/api/StorageIntegrationsApi.js index 35b20d0..b865d12 100644 --- a/JavaScript/src/api/StorageIntegrationsApi.js +++ b/JavaScript/src/api/StorageIntegrationsApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -19,7 +19,7 @@ import {Integration} from '../model/Integration'; /** * StorageIntegrations service. * @module api/StorageIntegrationsApi -* @version 1.0.2 +* @version 1.0.3 */ export class StorageIntegrationsApi { @@ -53,7 +53,8 @@ export class StorageIntegrationsApi { * @param {Object} opts Optional parameters * @param {Boolean} opts.includeSize (default to <.>) * @param {Number} opts.limit Maximum amount of items to return (default to <.>) - * @param {String} opts.fromToken Token, from which to continue iteration + * @param {Boolean} opts.paging Whether or not paging is enabled (default to <.>) + * @param {String} opts.fromToken [Only if paging is enabled] token, from which to continue iteration * @param {module:api/StorageIntegrationsApi~getBucketContentCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link <&vendorExtensions.x-jsdoc-type>} */ @@ -85,7 +86,7 @@ export class StorageIntegrationsApi { 'owner': owner,'repo': repo,'protocol': protocol,'bucket': bucket,'path': path }; let queryParams = { - 'include_size': opts['includeSize'],'limit': opts['limit'],'from_token': opts['fromToken'] + 'include_size': opts['includeSize'],'limit': opts['limit'],'paging': opts['paging'],'from_token': opts['fromToken'] }; let headerParams = { diff --git a/JavaScript/src/api/UserApi.js b/JavaScript/src/api/UserApi.js index def6a18..4041e3c 100644 --- a/JavaScript/src/api/UserApi.js +++ b/JavaScript/src/api/UserApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from "../ApiClient"; /** * User service. * @module api/UserApi -* @version 1.0.2 +* @version 1.0.3 */ export class UserApi { diff --git a/JavaScript/src/api/WebhooksApi.js b/JavaScript/src/api/WebhooksApi.js index 0f9eb59..b9e5fca 100644 --- a/JavaScript/src/api/WebhooksApi.js +++ b/JavaScript/src/api/WebhooksApi.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -19,7 +19,7 @@ import {RepoHooksBody} from '../model/RepoHooksBody'; /** * Webhooks service. * @module api/WebhooksApi -* @version 1.0.2 +* @version 1.0.3 */ export class WebhooksApi { diff --git a/JavaScript/src/index.js b/JavaScript/src/index.js index c59a5e8..21e032d 100644 --- a/JavaScript/src/index.js +++ b/JavaScript/src/index.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,13 +17,16 @@ import {Assignee} from './model/Assignee'; import {Body} from './model/Body'; import {Closed} from './model/Closed'; import {CollaboratorsCollaboratorBody} from './model/CollaboratorsCollaboratorBody'; +import {CreateAnnotatorTeam} from './model/CreateAnnotatorTeam'; import {CreateRepo} from './model/CreateRepo'; import {EditExperimentPost} from './model/EditExperimentPost'; import {ExperimentKeys} from './model/ExperimentKeys'; import {File} from './model/File'; import {Files} from './model/Files'; import {Files1} from './model/Files1'; +import {GrantLabelStudioAccess} from './model/GrantLabelStudioAccess'; import {HooksIdBody} from './model/HooksIdBody'; +import {InlineResponse200} from './model/InlineResponse200'; import {Integration} from './model/Integration'; import {IntegrationInner} from './model/IntegrationInner'; import {Issue} from './model/Issue'; @@ -31,6 +34,7 @@ import {IssueAssignee} from './model/IssueAssignee'; import {IssueLabels} from './model/IssueLabels'; import {IssueMilestone} from './model/IssueMilestone'; import {Issues} from './model/Issues'; +import {LabelStudioProjectAccess} from './model/LabelStudioProjectAccess'; import {Labels} from './model/Labels'; import {MigrateRepo} from './model/MigrateRepo'; import {Milestone} from './model/Milestone'; @@ -43,12 +47,14 @@ import {Title} from './model/Title'; import {User} from './model/User'; import {WebhookConfig} from './model/WebhookConfig'; import {WebhookEvents} from './model/WebhookEvents'; +import {AnnotationsApi} from './api/AnnotationsApi'; import {BranchesApi} from './api/BranchesApi'; import {CollaboratorsApi} from './api/CollaboratorsApi'; import {CommitsApi} from './api/CommitsApi'; import {ContentApi} from './api/ContentApi'; import {ExperimentsApi} from './api/ExperimentsApi'; import {IssuesApi} from './api/IssuesApi'; +import {OrganizationsApi} from './api/OrganizationsApi'; import {ReleasesApi} from './api/ReleasesApi'; import {RepositoryApi} from './api/RepositoryApi'; import {StorageIntegrationsApi} from './api/StorageIntegrationsApi'; @@ -84,7 +90,7 @@ import {WebhooksApi} from './api/WebhooksApi'; * *

* @module index -* @version 1.0.2 +* @version 1.0.3 */ export { /** @@ -117,6 +123,12 @@ export { */ CollaboratorsCollaboratorBody, + /** + * The CreateAnnotatorTeam model constructor. + * @property {module:model/CreateAnnotatorTeam} + */ + CreateAnnotatorTeam, + /** * The CreateRepo model constructor. * @property {module:model/CreateRepo} @@ -153,12 +165,24 @@ export { */ Files1, + /** + * The GrantLabelStudioAccess model constructor. + * @property {module:model/GrantLabelStudioAccess} + */ + GrantLabelStudioAccess, + /** * The HooksIdBody model constructor. * @property {module:model/HooksIdBody} */ HooksIdBody, + /** + * The InlineResponse200 model constructor. + * @property {module:model/InlineResponse200} + */ + InlineResponse200, + /** * The Integration model constructor. * @property {module:model/Integration} @@ -201,6 +225,12 @@ export { */ Issues, + /** + * The LabelStudioProjectAccess model constructor. + * @property {module:model/LabelStudioProjectAccess} + */ + LabelStudioProjectAccess, + /** * The Labels model constructor. * @property {module:model/Labels} @@ -273,6 +303,12 @@ export { */ WebhookEvents, + /** + * The AnnotationsApi service constructor. + * @property {module:api/AnnotationsApi} + */ + AnnotationsApi, + /** * The BranchesApi service constructor. * @property {module:api/BranchesApi} @@ -309,6 +345,12 @@ export { */ IssuesApi, + /** + * The OrganizationsApi service constructor. + * @property {module:api/OrganizationsApi} + */ + OrganizationsApi, + /** * The ReleasesApi service constructor. * @property {module:api/ReleasesApi} diff --git a/JavaScript/src/model/Assignee.js b/JavaScript/src/model/Assignee.js index a39dedf..79e2dfa 100644 --- a/JavaScript/src/model/Assignee.js +++ b/JavaScript/src/model/Assignee.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The Assignee model module. * @module model/Assignee - * @version 1.0.2 + * @version 1.0.3 */ export class Assignee { /** diff --git a/JavaScript/src/model/Body.js b/JavaScript/src/model/Body.js index f07f39c..1b4f66c 100644 --- a/JavaScript/src/model/Body.js +++ b/JavaScript/src/model/Body.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The Body model module. * @module model/Body - * @version 1.0.2 + * @version 1.0.3 */ export class Body { /** diff --git a/JavaScript/src/model/Closed.js b/JavaScript/src/model/Closed.js index 51e8c46..89a4450 100644 --- a/JavaScript/src/model/Closed.js +++ b/JavaScript/src/model/Closed.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The Closed model module. * @module model/Closed - * @version 1.0.2 + * @version 1.0.3 */ export class Closed { /** diff --git a/JavaScript/src/model/CollaboratorsCollaboratorBody.js b/JavaScript/src/model/CollaboratorsCollaboratorBody.js index bef85b2..16fb142 100644 --- a/JavaScript/src/model/CollaboratorsCollaboratorBody.js +++ b/JavaScript/src/model/CollaboratorsCollaboratorBody.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The CollaboratorsCollaboratorBody model module. * @module model/CollaboratorsCollaboratorBody - * @version 1.0.2 + * @version 1.0.3 */ export class CollaboratorsCollaboratorBody { /** diff --git a/JavaScript/src/model/CreateAnnotatorTeam.js b/JavaScript/src/model/CreateAnnotatorTeam.js new file mode 100644 index 0000000..64f9288 --- /dev/null +++ b/JavaScript/src/model/CreateAnnotatorTeam.js @@ -0,0 +1,122 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +import {ApiClient} from '../ApiClient'; + +/** + * The CreateAnnotatorTeam model module. + * @module model/CreateAnnotatorTeam + * @version 1.0.3 + */ +export class CreateAnnotatorTeam { + /** + * Constructs a new CreateAnnotatorTeam. + * @alias module:model/CreateAnnotatorTeam + * @class + * @param name {String} Team name + */ + constructor(name) { + this.name = name; + } + + /** + * Constructs a CreateAnnotatorTeam from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/CreateAnnotatorTeam} obj Optional instance to populate. + * @return {module:model/CreateAnnotatorTeam} The populated CreateAnnotatorTeam instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new CreateAnnotatorTeam(); + if (data.hasOwnProperty('name')) + obj.name = ApiClient.convertToType(data['name'], 'String'); + if (data.hasOwnProperty('description')) + obj.description = ApiClient.convertToType(data['description'], 'String'); + if (data.hasOwnProperty('team_type')) + obj.teamType = ApiClient.convertToType(data['team_type'], 'String'); + if (data.hasOwnProperty('permission')) + obj.permission = ApiClient.convertToType(data['permission'], 'String'); + } + return obj; + } +} + +/** + * Team name + * @member {String} name + */ +CreateAnnotatorTeam.prototype.name = undefined; + +/** + * Team description + * @member {String} description + */ +CreateAnnotatorTeam.prototype.description = undefined; + +/** + * Allowed values for the teamType property. + * @enum {String} + * @readonly + */ +CreateAnnotatorTeam.TeamTypeEnum = { + /** + * value: "normal" + * @const + */ + normal: "normal", + + /** + * value: "annotator" + * @const + */ + annotator: "annotator" +}; +/** + * Type of team - normal teams have repository access, annotator teams only have annotation project access + * @member {module:model/CreateAnnotatorTeam.TeamTypeEnum} teamType + * @default 'normal' + */ +CreateAnnotatorTeam.prototype.teamType = 'normal'; + +/** + * Allowed values for the permission property. + * @enum {String} + * @readonly + */ +CreateAnnotatorTeam.PermissionEnum = { + /** + * value: "read" + * @const + */ + read: "read", + + /** + * value: "write" + * @const + */ + write: "write", + + /** + * value: "admin" + * @const + */ + admin: "admin" +}; +/** + * Repository permission level (required for normal teams, ignored for annotator teams) + * @member {module:model/CreateAnnotatorTeam.PermissionEnum} permission + */ +CreateAnnotatorTeam.prototype.permission = undefined; + diff --git a/JavaScript/src/model/CreateRepo.js b/JavaScript/src/model/CreateRepo.js index f3596aa..7a856af 100644 --- a/JavaScript/src/model/CreateRepo.js +++ b/JavaScript/src/model/CreateRepo.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The CreateRepo model module. * @module model/CreateRepo - * @version 1.0.2 + * @version 1.0.3 */ export class CreateRepo { /** diff --git a/JavaScript/src/model/EditExperimentPost.js b/JavaScript/src/model/EditExperimentPost.js index 1275723..0dc37f8 100644 --- a/JavaScript/src/model/EditExperimentPost.js +++ b/JavaScript/src/model/EditExperimentPost.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The EditExperimentPost model module. * @module model/EditExperimentPost - * @version 1.0.2 + * @version 1.0.3 */ export class EditExperimentPost { /** diff --git a/JavaScript/src/model/ExperimentKeys.js b/JavaScript/src/model/ExperimentKeys.js index e73674f..4f427c5 100644 --- a/JavaScript/src/model/ExperimentKeys.js +++ b/JavaScript/src/model/ExperimentKeys.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The ExperimentKeys model module. * @module model/ExperimentKeys - * @version 1.0.2 + * @version 1.0.3 */ export class ExperimentKeys { /** diff --git a/JavaScript/src/model/File.js b/JavaScript/src/model/File.js index cf9f8e7..8d35566 100644 --- a/JavaScript/src/model/File.js +++ b/JavaScript/src/model/File.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The File model module. * @module model/File - * @version 1.0.2 + * @version 1.0.3 */ export class File { /** diff --git a/JavaScript/src/model/Files.js b/JavaScript/src/model/Files.js index dd1d741..c98518f 100644 --- a/JavaScript/src/model/Files.js +++ b/JavaScript/src/model/Files.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The Files model module. * @module model/Files - * @version 1.0.2 + * @version 1.0.3 */ export class Files extends Array { /** diff --git a/JavaScript/src/model/Files1.js b/JavaScript/src/model/Files1.js index ca52cdc..3e812b9 100644 --- a/JavaScript/src/model/Files1.js +++ b/JavaScript/src/model/Files1.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The Files1 model module. * @module model/Files1 - * @version 1.0.2 + * @version 1.0.3 */ export class Files1 { /** @@ -40,8 +40,6 @@ export class Files1 { obj = obj || new Files1(); if (data.hasOwnProperty('entries')) obj.entries = ApiClient.convertToType(data['entries'], [File]); - if (data.hasOwnProperty('limit')) - obj.limit = ApiClient.convertToType(data['limit'], 'Number'); if (data.hasOwnProperty('next_token')) obj.nextToken = ApiClient.convertToType(data['next_token'], 'String'); } @@ -55,11 +53,7 @@ export class Files1 { Files1.prototype.entries = undefined; /** - * @member {Number} limit - */ -Files1.prototype.limit = undefined; - -/** + * Next token to continue pagination from * @member {String} nextToken */ Files1.prototype.nextToken = undefined; diff --git a/JavaScript/src/model/GrantLabelStudioAccess.js b/JavaScript/src/model/GrantLabelStudioAccess.js new file mode 100644 index 0000000..0364f51 --- /dev/null +++ b/JavaScript/src/model/GrantLabelStudioAccess.js @@ -0,0 +1,82 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +import {ApiClient} from '../ApiClient'; + +/** + * The GrantLabelStudioAccess model module. + * @module model/GrantLabelStudioAccess + * @version 1.0.3 + */ +export class GrantLabelStudioAccess { + /** + * Constructs a new GrantLabelStudioAccess. + * @alias module:model/GrantLabelStudioAccess + * @class + * @param projectId {Number} Project ID, -1 for wildcard access to all projects + */ + constructor(projectId) { + this.projectId = projectId; + } + + /** + * Constructs a GrantLabelStudioAccess from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/GrantLabelStudioAccess} obj Optional instance to populate. + * @return {module:model/GrantLabelStudioAccess} The populated GrantLabelStudioAccess instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new GrantLabelStudioAccess(); + if (data.hasOwnProperty('project_id')) + obj.projectId = ApiClient.convertToType(data['project_id'], 'Number'); + if (data.hasOwnProperty('access_level')) + obj.accessLevel = ApiClient.convertToType(data['access_level'], 'String'); + } + return obj; + } +} + +/** + * Project ID, -1 for wildcard access to all projects + * @member {Number} projectId + */ +GrantLabelStudioAccess.prototype.projectId = undefined; + +/** + * Allowed values for the accessLevel property. + * @enum {String} + * @readonly + */ +GrantLabelStudioAccess.AccessLevelEnum = { + /** + * value: "annotator" + * @const + */ + annotator: "annotator", + + /** + * value: "none" + * @const + */ + none: "none" +}; +/** + * Access level to grant + * @member {module:model/GrantLabelStudioAccess.AccessLevelEnum} accessLevel + * @default 'annotator' + */ +GrantLabelStudioAccess.prototype.accessLevel = 'annotator'; + diff --git a/JavaScript/src/model/HooksIdBody.js b/JavaScript/src/model/HooksIdBody.js index 39ea27d..d659171 100644 --- a/JavaScript/src/model/HooksIdBody.js +++ b/JavaScript/src/model/HooksIdBody.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -19,7 +19,7 @@ import {WebhookEvents} from './WebhookEvents'; /** * The HooksIdBody model module. * @module model/HooksIdBody - * @version 1.0.2 + * @version 1.0.3 */ export class HooksIdBody { /** diff --git a/JavaScript/src/model/InlineResponse200.js b/JavaScript/src/model/InlineResponse200.js new file mode 100644 index 0000000..f3b2ffe --- /dev/null +++ b/JavaScript/src/model/InlineResponse200.js @@ -0,0 +1,84 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +import {ApiClient} from '../ApiClient'; + +/** + * The InlineResponse200 model module. + * @module model/InlineResponse200 + * @version 1.0.3 + */ +export class InlineResponse200 { + /** + * Constructs a new InlineResponse200. + * @alias module:model/InlineResponse200 + * @class + */ + constructor() { + } + + /** + * Constructs a InlineResponse200 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/InlineResponse200} obj Optional instance to populate. + * @return {module:model/InlineResponse200} The populated InlineResponse200 instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new InlineResponse200(); + if (data.hasOwnProperty('user_id')) + obj.userId = ApiClient.convertToType(data['user_id'], 'Number'); + if (data.hasOwnProperty('project_id')) + obj.projectId = ApiClient.convertToType(data['project_id'], 'Number'); + if (data.hasOwnProperty('access_level')) + obj.accessLevel = ApiClient.convertToType(data['access_level'], 'String'); + } + return obj; + } +} + +/** + * @member {Number} userId + */ +InlineResponse200.prototype.userId = undefined; + +/** + * @member {Number} projectId + */ +InlineResponse200.prototype.projectId = undefined; + +/** + * Allowed values for the accessLevel property. + * @enum {String} + * @readonly + */ +InlineResponse200.AccessLevelEnum = { + /** + * value: "none" + * @const + */ + none: "none", + + /** + * value: "annotator" + * @const + */ + annotator: "annotator" +}; +/** + * @member {module:model/InlineResponse200.AccessLevelEnum} accessLevel + */ +InlineResponse200.prototype.accessLevel = undefined; + diff --git a/JavaScript/src/model/Integration.js b/JavaScript/src/model/Integration.js index 6ed5d2d..d3f3822 100644 --- a/JavaScript/src/model/Integration.js +++ b/JavaScript/src/model/Integration.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -18,7 +18,7 @@ import {IntegrationInner} from './IntegrationInner'; /** * The Integration model module. * @module model/Integration - * @version 1.0.2 + * @version 1.0.3 */ export class Integration extends Array { /** diff --git a/JavaScript/src/model/IntegrationInner.js b/JavaScript/src/model/IntegrationInner.js index d9b1806..88c632d 100644 --- a/JavaScript/src/model/IntegrationInner.js +++ b/JavaScript/src/model/IntegrationInner.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The IntegrationInner model module. * @module model/IntegrationInner - * @version 1.0.2 + * @version 1.0.3 */ export class IntegrationInner { /** diff --git a/JavaScript/src/model/Issue.js b/JavaScript/src/model/Issue.js index e421c16..e0bbb52 100644 --- a/JavaScript/src/model/Issue.js +++ b/JavaScript/src/model/Issue.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -23,7 +23,7 @@ import {User} from './User'; /** * The Issue model module. * @module model/Issue - * @version 1.0.2 + * @version 1.0.3 */ export class Issue { /** diff --git a/JavaScript/src/model/IssueAssignee.js b/JavaScript/src/model/IssueAssignee.js index 4035dda..21743fd 100644 --- a/JavaScript/src/model/IssueAssignee.js +++ b/JavaScript/src/model/IssueAssignee.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The IssueAssignee model module. * @module model/IssueAssignee - * @version 1.0.2 + * @version 1.0.3 */ export class IssueAssignee { /** diff --git a/JavaScript/src/model/IssueLabels.js b/JavaScript/src/model/IssueLabels.js index f0dbcf9..0b62580 100644 --- a/JavaScript/src/model/IssueLabels.js +++ b/JavaScript/src/model/IssueLabels.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The IssueLabels model module. * @module model/IssueLabels - * @version 1.0.2 + * @version 1.0.3 */ export class IssueLabels { /** diff --git a/JavaScript/src/model/IssueMilestone.js b/JavaScript/src/model/IssueMilestone.js index b03038a..31d2c48 100644 --- a/JavaScript/src/model/IssueMilestone.js +++ b/JavaScript/src/model/IssueMilestone.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The IssueMilestone model module. * @module model/IssueMilestone - * @version 1.0.2 + * @version 1.0.3 */ export class IssueMilestone { /** diff --git a/JavaScript/src/model/Issues.js b/JavaScript/src/model/Issues.js index ffd4a2b..ed67e0b 100644 --- a/JavaScript/src/model/Issues.js +++ b/JavaScript/src/model/Issues.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -18,7 +18,7 @@ import {Issue} from './Issue'; /** * The Issues model module. * @module model/Issues - * @version 1.0.2 + * @version 1.0.3 */ export class Issues extends Array { /** diff --git a/JavaScript/src/model/LabelStudioProjectAccess.js b/JavaScript/src/model/LabelStudioProjectAccess.js new file mode 100644 index 0000000..8871288 --- /dev/null +++ b/JavaScript/src/model/LabelStudioProjectAccess.js @@ -0,0 +1,123 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +import {ApiClient} from '../ApiClient'; +import {User} from './User'; + +/** + * The LabelStudioProjectAccess model module. + * @module model/LabelStudioProjectAccess + * @version 1.0.3 + */ +export class LabelStudioProjectAccess { + /** + * Constructs a new LabelStudioProjectAccess. + * @alias module:model/LabelStudioProjectAccess + * @class + */ + constructor() { + } + + /** + * Constructs a LabelStudioProjectAccess from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/LabelStudioProjectAccess} obj Optional instance to populate. + * @return {module:model/LabelStudioProjectAccess} The populated LabelStudioProjectAccess instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new LabelStudioProjectAccess(); + if (data.hasOwnProperty('id')) + obj.id = ApiClient.convertToType(data['id'], 'Number'); + if (data.hasOwnProperty('repo_id')) + obj.repoId = ApiClient.convertToType(data['repo_id'], 'Number'); + if (data.hasOwnProperty('project_id')) + obj.projectId = ApiClient.convertToType(data['project_id'], 'Number'); + if (data.hasOwnProperty('user_id')) + obj.userId = ApiClient.convertToType(data['user_id'], 'Number'); + if (data.hasOwnProperty('team_id')) + obj.teamId = ApiClient.convertToType(data['team_id'], 'Number'); + if (data.hasOwnProperty('access_level')) + obj.accessLevel = ApiClient.convertToType(data['access_level'], 'String'); + if (data.hasOwnProperty('created_unix')) + obj.createdUnix = ApiClient.convertToType(data['created_unix'], 'Number'); + if (data.hasOwnProperty('user')) + obj.user = User.constructFromObject(data['user']); + } + return obj; + } +} + +/** + * @member {Number} id + */ +LabelStudioProjectAccess.prototype.id = undefined; + +/** + * @member {Number} repoId + */ +LabelStudioProjectAccess.prototype.repoId = undefined; + +/** + * Project ID, -1 means wildcard access to all projects + * @member {Number} projectId + */ +LabelStudioProjectAccess.prototype.projectId = undefined; + +/** + * User ID (present for user access entries) + * @member {Number} userId + */ +LabelStudioProjectAccess.prototype.userId = undefined; + +/** + * Team ID (present for team access entries) + * @member {Number} teamId + */ +LabelStudioProjectAccess.prototype.teamId = undefined; + +/** + * Allowed values for the accessLevel property. + * @enum {String} + * @readonly + */ +LabelStudioProjectAccess.AccessLevelEnum = { + /** + * value: "none" + * @const + */ + none: "none", + + /** + * value: "annotator" + * @const + */ + annotator: "annotator" +}; +/** + * @member {module:model/LabelStudioProjectAccess.AccessLevelEnum} accessLevel + */ +LabelStudioProjectAccess.prototype.accessLevel = undefined; + +/** + * @member {Number} createdUnix + */ +LabelStudioProjectAccess.prototype.createdUnix = undefined; + +/** + * @member {module:model/User} user + */ +LabelStudioProjectAccess.prototype.user = undefined; + diff --git a/JavaScript/src/model/Labels.js b/JavaScript/src/model/Labels.js index b7313ba..a6801ae 100644 --- a/JavaScript/src/model/Labels.js +++ b/JavaScript/src/model/Labels.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The Labels model module. * @module model/Labels - * @version 1.0.2 + * @version 1.0.3 */ export class Labels extends Array { /** diff --git a/JavaScript/src/model/MigrateRepo.js b/JavaScript/src/model/MigrateRepo.js index c0096df..2a0fb63 100644 --- a/JavaScript/src/model/MigrateRepo.js +++ b/JavaScript/src/model/MigrateRepo.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The MigrateRepo model module. * @module model/MigrateRepo - * @version 1.0.2 + * @version 1.0.3 */ export class MigrateRepo { /** diff --git a/JavaScript/src/model/Milestone.js b/JavaScript/src/model/Milestone.js index 950d394..d558b6d 100644 --- a/JavaScript/src/model/Milestone.js +++ b/JavaScript/src/model/Milestone.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The Milestone model module. * @module model/Milestone - * @version 1.0.2 + * @version 1.0.3 */ export class Milestone { /** diff --git a/JavaScript/src/model/PatchIssue.js b/JavaScript/src/model/PatchIssue.js index 8e1abcb..888da5b 100644 --- a/JavaScript/src/model/PatchIssue.js +++ b/JavaScript/src/model/PatchIssue.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -22,7 +22,7 @@ import {Title} from './Title'; /** * The PatchIssue model module. * @module model/PatchIssue - * @version 1.0.2 + * @version 1.0.3 */ export class PatchIssue { /** diff --git a/JavaScript/src/model/PostIssue.js b/JavaScript/src/model/PostIssue.js index 056ff80..95a5656 100644 --- a/JavaScript/src/model/PostIssue.js +++ b/JavaScript/src/model/PostIssue.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -23,7 +23,7 @@ import {Title} from './Title'; /** * The PostIssue model module. * @module model/PostIssue - * @version 1.0.2 + * @version 1.0.3 */ export class PostIssue { /** diff --git a/JavaScript/src/model/PutFile.js b/JavaScript/src/model/PutFile.js index aeeae19..c1ce37c 100644 --- a/JavaScript/src/model/PutFile.js +++ b/JavaScript/src/model/PutFile.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The PutFile model module. * @module model/PutFile - * @version 1.0.2 + * @version 1.0.3 */ export class PutFile { /** diff --git a/JavaScript/src/model/RepoHooksBody.js b/JavaScript/src/model/RepoHooksBody.js index f938f1c..de4c486 100644 --- a/JavaScript/src/model/RepoHooksBody.js +++ b/JavaScript/src/model/RepoHooksBody.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -19,7 +19,7 @@ import {WebhookEvents} from './WebhookEvents'; /** * The RepoHooksBody model module. * @module model/RepoHooksBody - * @version 1.0.2 + * @version 1.0.3 */ export class RepoHooksBody { /** diff --git a/JavaScript/src/model/State.js b/JavaScript/src/model/State.js index a05c448..bd0c36c 100644 --- a/JavaScript/src/model/State.js +++ b/JavaScript/src/model/State.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/src/model/Title.js b/JavaScript/src/model/Title.js index 4498fec..5b862c0 100644 --- a/JavaScript/src/model/Title.js +++ b/JavaScript/src/model/Title.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The Title model module. * @module model/Title - * @version 1.0.2 + * @version 1.0.3 */ export class Title { /** diff --git a/JavaScript/src/model/User.js b/JavaScript/src/model/User.js index 9971b6e..2bfd9f1 100644 --- a/JavaScript/src/model/User.js +++ b/JavaScript/src/model/User.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The User model module. * @module model/User - * @version 1.0.2 + * @version 1.0.3 */ export class User { /** diff --git a/JavaScript/src/model/WebhookConfig.js b/JavaScript/src/model/WebhookConfig.js index 1347622..b1e189d 100644 --- a/JavaScript/src/model/WebhookConfig.js +++ b/JavaScript/src/model/WebhookConfig.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The WebhookConfig model module. * @module model/WebhookConfig - * @version 1.0.2 + * @version 1.0.3 */ export class WebhookConfig { /** diff --git a/JavaScript/src/model/WebhookEvents.js b/JavaScript/src/model/WebhookEvents.js index 769afa8..5d01f06 100644 --- a/JavaScript/src/model/WebhookEvents.js +++ b/JavaScript/src/model/WebhookEvents.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -17,7 +17,7 @@ import {ApiClient} from '../ApiClient'; /** * The WebhookEvents model module. * @module model/WebhookEvents - * @version 1.0.2 + * @version 1.0.3 */ export class WebhookEvents extends Array { /** diff --git a/JavaScript/test/api/AnnotationsApi.spec.js b/JavaScript/test/api/AnnotationsApi.spec.js new file mode 100644 index 0000000..ae8999d --- /dev/null +++ b/JavaScript/test/api/AnnotationsApi.spec.js @@ -0,0 +1,210 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.DagsHubApi); + } +}(this, function(expect, DagsHubApi) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new DagsHubApi.AnnotationsApi(); + }); + + describe('(package)', function() { + describe('AnnotationsApi', function() { + describe('getLabelStudioTeamAccess', function() { + it('should call getLabelStudioTeamAccess successfully', function(done) { + // TODO: uncomment, update parameter values for getLabelStudioTeamAccess call and complete the assertions + /* + var opts = {}; + + instance.getLabelStudioTeamAccess(owner, repo, teamid, opts, function(error, data, response) { + if (error) { + done(error); + return; + } + // TODO: update response assertions + expect(data).to.be.a(DagsHubApi.LabelStudioProjectAccess); + + done(); + }); + */ + // TODO: uncomment and complete method invocation above, then delete this line and the next: + done(); + }); + }); + describe('getLabelStudioUserAccess', function() { + it('should call getLabelStudioUserAccess successfully', function(done) { + // TODO: uncomment, update parameter values for getLabelStudioUserAccess call and complete the assertions + /* + var opts = {}; + + instance.getLabelStudioUserAccess(owner, repo, userid, opts, function(error, data, response) { + if (error) { + done(error); + return; + } + // TODO: update response assertions + expect(data).to.be.a(DagsHubApi.InlineResponse200); + + done(); + }); + */ + // TODO: uncomment and complete method invocation above, then delete this line and the next: + done(); + }); + }); + describe('grantLabelStudioTeamAccess', function() { + it('should call grantLabelStudioTeamAccess successfully', function(done) { + // TODO: uncomment, update parameter values for grantLabelStudioTeamAccess call + /* + + instance.grantLabelStudioTeamAccess(body, owner, repo, teamid, function(error, data, response) { + if (error) { + done(error); + return; + } + + done(); + }); + */ + // TODO: uncomment and complete method invocation above, then delete this line and the next: + done(); + }); + }); + describe('grantLabelStudioUserAccess', function() { + it('should call grantLabelStudioUserAccess successfully', function(done) { + // TODO: uncomment, update parameter values for grantLabelStudioUserAccess call + /* + + instance.grantLabelStudioUserAccess(body, owner, repo, userid, function(error, data, response) { + if (error) { + done(error); + return; + } + + done(); + }); + */ + // TODO: uncomment and complete method invocation above, then delete this line and the next: + done(); + }); + }); + describe('listLabelStudioTeamAccess', function() { + it('should call listLabelStudioTeamAccess successfully', function(done) { + // TODO: uncomment, update parameter values for listLabelStudioTeamAccess call and complete the assertions + /* + var opts = {}; + + instance.listLabelStudioTeamAccess(owner, repo, opts, function(error, data, response) { + if (error) { + done(error); + return; + } + // TODO: update response assertions + let dataCtr = data; + expect(dataCtr).to.be.an(Array); + expect(dataCtr).to.not.be.empty(); + for (let p in dataCtr) { + let data = dataCtr[p]; + expect(data).to.be.a(DagsHubApi.LabelStudioProjectAccess); + } + + done(); + }); + */ + // TODO: uncomment and complete method invocation above, then delete this line and the next: + done(); + }); + }); + describe('listLabelStudioUserAccess', function() { + it('should call listLabelStudioUserAccess successfully', function(done) { + // TODO: uncomment, update parameter values for listLabelStudioUserAccess call and complete the assertions + /* + var opts = {}; + + instance.listLabelStudioUserAccess(owner, repo, opts, function(error, data, response) { + if (error) { + done(error); + return; + } + // TODO: update response assertions + let dataCtr = data; + expect(dataCtr).to.be.an(Array); + expect(dataCtr).to.not.be.empty(); + for (let p in dataCtr) { + let data = dataCtr[p]; + expect(data).to.be.a(DagsHubApi.LabelStudioProjectAccess); + } + + done(); + }); + */ + // TODO: uncomment and complete method invocation above, then delete this line and the next: + done(); + }); + }); + describe('revokeLabelStudioTeamAccess', function() { + it('should call revokeLabelStudioTeamAccess successfully', function(done) { + // TODO: uncomment, update parameter values for revokeLabelStudioTeamAccess call + /* + var opts = {}; + + instance.revokeLabelStudioTeamAccess(owner, repo, teamid, opts, function(error, data, response) { + if (error) { + done(error); + return; + } + + done(); + }); + */ + // TODO: uncomment and complete method invocation above, then delete this line and the next: + done(); + }); + }); + describe('revokeLabelStudioUserAccess', function() { + it('should call revokeLabelStudioUserAccess successfully', function(done) { + // TODO: uncomment, update parameter values for revokeLabelStudioUserAccess call + /* + var opts = {}; + + instance.revokeLabelStudioUserAccess(owner, repo, userid, opts, function(error, data, response) { + if (error) { + done(error); + return; + } + + done(); + }); + */ + // TODO: uncomment and complete method invocation above, then delete this line and the next: + done(); + }); + }); + }); + }); + +})); diff --git a/JavaScript/test/api/BranchesApi.spec.js b/JavaScript/test/api/BranchesApi.spec.js index 2c0cd24..2500047 100644 --- a/JavaScript/test/api/BranchesApi.spec.js +++ b/JavaScript/test/api/BranchesApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/api/CollaboratorsApi.spec.js b/JavaScript/test/api/CollaboratorsApi.spec.js index 981f8b5..c42972b 100644 --- a/JavaScript/test/api/CollaboratorsApi.spec.js +++ b/JavaScript/test/api/CollaboratorsApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/api/CommitsApi.spec.js b/JavaScript/test/api/CommitsApi.spec.js index 11e18df..726af29 100644 --- a/JavaScript/test/api/CommitsApi.spec.js +++ b/JavaScript/test/api/CommitsApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/api/ContentApi.spec.js b/JavaScript/test/api/ContentApi.spec.js index f04fa4d..13e111d 100644 --- a/JavaScript/test/api/ContentApi.spec.js +++ b/JavaScript/test/api/ContentApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/api/ExperimentsApi.spec.js b/JavaScript/test/api/ExperimentsApi.spec.js index 84aadad..2eaa7db 100644 --- a/JavaScript/test/api/ExperimentsApi.spec.js +++ b/JavaScript/test/api/ExperimentsApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/api/IssuesApi.spec.js b/JavaScript/test/api/IssuesApi.spec.js index 7a42b4a..a92e051 100644 --- a/JavaScript/test/api/IssuesApi.spec.js +++ b/JavaScript/test/api/IssuesApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/api/OrganizationsApi.spec.js b/JavaScript/test/api/OrganizationsApi.spec.js new file mode 100644 index 0000000..dcc69c3 --- /dev/null +++ b/JavaScript/test/api/OrganizationsApi.spec.js @@ -0,0 +1,58 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.DagsHubApi); + } +}(this, function(expect, DagsHubApi) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new DagsHubApi.OrganizationsApi(); + }); + + describe('(package)', function() { + describe('OrganizationsApi', function() { + describe('createOrgTeam', function() { + it('should call createOrgTeam successfully', function(done) { + // TODO: uncomment, update parameter values for createOrgTeam call + /* + + instance.createOrgTeam(body, orgname, function(error, data, response) { + if (error) { + done(error); + return; + } + + done(); + }); + */ + // TODO: uncomment and complete method invocation above, then delete this line and the next: + done(); + }); + }); + }); + }); + +})); diff --git a/JavaScript/test/api/ReleasesApi.spec.js b/JavaScript/test/api/ReleasesApi.spec.js index 5d5690d..3cb4327 100644 --- a/JavaScript/test/api/ReleasesApi.spec.js +++ b/JavaScript/test/api/ReleasesApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/api/RepositoryApi.spec.js b/JavaScript/test/api/RepositoryApi.spec.js index e9bf72a..c18ff7f 100644 --- a/JavaScript/test/api/RepositoryApi.spec.js +++ b/JavaScript/test/api/RepositoryApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/api/StorageIntegrationsApi.spec.js b/JavaScript/test/api/StorageIntegrationsApi.spec.js index 6a3f67e..20a6cfa 100644 --- a/JavaScript/test/api/StorageIntegrationsApi.spec.js +++ b/JavaScript/test/api/StorageIntegrationsApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/api/UserApi.spec.js b/JavaScript/test/api/UserApi.spec.js index 1d18711..0aae2f1 100644 --- a/JavaScript/test/api/UserApi.spec.js +++ b/JavaScript/test/api/UserApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/api/WebhooksApi.spec.js b/JavaScript/test/api/WebhooksApi.spec.js index 8193752..98a4bbb 100644 --- a/JavaScript/test/api/WebhooksApi.spec.js +++ b/JavaScript/test/api/WebhooksApi.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Assignee.spec.js b/JavaScript/test/model/Assignee.spec.js index 60fd680..8270a85 100644 --- a/JavaScript/test/model/Assignee.spec.js +++ b/JavaScript/test/model/Assignee.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Body.spec.js b/JavaScript/test/model/Body.spec.js index 300231d..3a46933 100644 --- a/JavaScript/test/model/Body.spec.js +++ b/JavaScript/test/model/Body.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Closed.spec.js b/JavaScript/test/model/Closed.spec.js index f9ac10d..d7ed435 100644 --- a/JavaScript/test/model/Closed.spec.js +++ b/JavaScript/test/model/Closed.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/CollaboratorsCollaboratorBody.spec.js b/JavaScript/test/model/CollaboratorsCollaboratorBody.spec.js index 10d62f6..91ca2af 100644 --- a/JavaScript/test/model/CollaboratorsCollaboratorBody.spec.js +++ b/JavaScript/test/model/CollaboratorsCollaboratorBody.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/CreateAnnotatorTeam.spec.js b/JavaScript/test/model/CreateAnnotatorTeam.spec.js new file mode 100644 index 0000000..eece40a --- /dev/null +++ b/JavaScript/test/model/CreateAnnotatorTeam.spec.js @@ -0,0 +1,69 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.DagsHubApi); + } +}(this, function(expect, DagsHubApi) { + 'use strict'; + + var instance; + + describe('(package)', function() { + describe('CreateAnnotatorTeam', function() { + beforeEach(function() { + instance = new DagsHubApi.CreateAnnotatorTeam(); + }); + + it('should create an instance of CreateAnnotatorTeam', function() { + // TODO: update the code to test CreateAnnotatorTeam + expect(instance).to.be.a(DagsHubApi.CreateAnnotatorTeam); + }); + + it('should have the property name (base name: "name")', function() { + // TODO: update the code to test the property name + expect(instance).to.have.property('name'); + // expect(instance.name).to.be(expectedValueLiteral); + }); + + it('should have the property description (base name: "description")', function() { + // TODO: update the code to test the property description + expect(instance).to.have.property('description'); + // expect(instance.description).to.be(expectedValueLiteral); + }); + + it('should have the property teamType (base name: "team_type")', function() { + // TODO: update the code to test the property teamType + expect(instance).to.have.property('teamType'); + // expect(instance.teamType).to.be(expectedValueLiteral); + }); + + it('should have the property permission (base name: "permission")', function() { + // TODO: update the code to test the property permission + expect(instance).to.have.property('permission'); + // expect(instance.permission).to.be(expectedValueLiteral); + }); + + }); + }); + +})); diff --git a/JavaScript/test/model/CreateRepo.spec.js b/JavaScript/test/model/CreateRepo.spec.js index b1602f7..834f853 100644 --- a/JavaScript/test/model/CreateRepo.spec.js +++ b/JavaScript/test/model/CreateRepo.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/EditExperimentPost.spec.js b/JavaScript/test/model/EditExperimentPost.spec.js index 1239f3c..c7a57a1 100644 --- a/JavaScript/test/model/EditExperimentPost.spec.js +++ b/JavaScript/test/model/EditExperimentPost.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/ExperimentKeys.spec.js b/JavaScript/test/model/ExperimentKeys.spec.js index 48062aa..11f166d 100644 --- a/JavaScript/test/model/ExperimentKeys.spec.js +++ b/JavaScript/test/model/ExperimentKeys.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/File.spec.js b/JavaScript/test/model/File.spec.js index e4b8384..53b40e8 100644 --- a/JavaScript/test/model/File.spec.js +++ b/JavaScript/test/model/File.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Files.spec.js b/JavaScript/test/model/Files.spec.js index d93c939..ec365eb 100644 --- a/JavaScript/test/model/Files.spec.js +++ b/JavaScript/test/model/Files.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Files1.spec.js b/JavaScript/test/model/Files1.spec.js index c40ab51..7c245b9 100644 --- a/JavaScript/test/model/Files1.spec.js +++ b/JavaScript/test/model/Files1.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git @@ -45,12 +45,6 @@ // expect(instance.entries).to.be(expectedValueLiteral); }); - it('should have the property limit (base name: "limit")', function() { - // TODO: update the code to test the property limit - expect(instance).to.have.property('limit'); - // expect(instance.limit).to.be(expectedValueLiteral); - }); - it('should have the property nextToken (base name: "next_token")', function() { // TODO: update the code to test the property nextToken expect(instance).to.have.property('nextToken'); diff --git a/JavaScript/test/model/GrantLabelStudioAccess.spec.js b/JavaScript/test/model/GrantLabelStudioAccess.spec.js new file mode 100644 index 0000000..221d44c --- /dev/null +++ b/JavaScript/test/model/GrantLabelStudioAccess.spec.js @@ -0,0 +1,57 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.DagsHubApi); + } +}(this, function(expect, DagsHubApi) { + 'use strict'; + + var instance; + + describe('(package)', function() { + describe('GrantLabelStudioAccess', function() { + beforeEach(function() { + instance = new DagsHubApi.GrantLabelStudioAccess(); + }); + + it('should create an instance of GrantLabelStudioAccess', function() { + // TODO: update the code to test GrantLabelStudioAccess + expect(instance).to.be.a(DagsHubApi.GrantLabelStudioAccess); + }); + + it('should have the property projectId (base name: "project_id")', function() { + // TODO: update the code to test the property projectId + expect(instance).to.have.property('projectId'); + // expect(instance.projectId).to.be(expectedValueLiteral); + }); + + it('should have the property accessLevel (base name: "access_level")', function() { + // TODO: update the code to test the property accessLevel + expect(instance).to.have.property('accessLevel'); + // expect(instance.accessLevel).to.be(expectedValueLiteral); + }); + + }); + }); + +})); diff --git a/JavaScript/test/model/HooksIdBody.spec.js b/JavaScript/test/model/HooksIdBody.spec.js index 1137459..44cf3ee 100644 --- a/JavaScript/test/model/HooksIdBody.spec.js +++ b/JavaScript/test/model/HooksIdBody.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/InlineResponse200.spec.js b/JavaScript/test/model/InlineResponse200.spec.js new file mode 100644 index 0000000..7dd2867 --- /dev/null +++ b/JavaScript/test/model/InlineResponse200.spec.js @@ -0,0 +1,63 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.DagsHubApi); + } +}(this, function(expect, DagsHubApi) { + 'use strict'; + + var instance; + + describe('(package)', function() { + describe('InlineResponse200', function() { + beforeEach(function() { + instance = new DagsHubApi.InlineResponse200(); + }); + + it('should create an instance of InlineResponse200', function() { + // TODO: update the code to test InlineResponse200 + expect(instance).to.be.a(DagsHubApi.InlineResponse200); + }); + + it('should have the property userId (base name: "user_id")', function() { + // TODO: update the code to test the property userId + expect(instance).to.have.property('userId'); + // expect(instance.userId).to.be(expectedValueLiteral); + }); + + it('should have the property projectId (base name: "project_id")', function() { + // TODO: update the code to test the property projectId + expect(instance).to.have.property('projectId'); + // expect(instance.projectId).to.be(expectedValueLiteral); + }); + + it('should have the property accessLevel (base name: "access_level")', function() { + // TODO: update the code to test the property accessLevel + expect(instance).to.have.property('accessLevel'); + // expect(instance.accessLevel).to.be(expectedValueLiteral); + }); + + }); + }); + +})); diff --git a/JavaScript/test/model/Integration.spec.js b/JavaScript/test/model/Integration.spec.js index acdbd14..f95272e 100644 --- a/JavaScript/test/model/Integration.spec.js +++ b/JavaScript/test/model/Integration.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/IntegrationInner.spec.js b/JavaScript/test/model/IntegrationInner.spec.js index 472eaef..b0ba614 100644 --- a/JavaScript/test/model/IntegrationInner.spec.js +++ b/JavaScript/test/model/IntegrationInner.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Issue.spec.js b/JavaScript/test/model/Issue.spec.js index 2fba05d..a5e0668 100644 --- a/JavaScript/test/model/Issue.spec.js +++ b/JavaScript/test/model/Issue.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/IssueAssignee.spec.js b/JavaScript/test/model/IssueAssignee.spec.js index 2fa5009..3f76579 100644 --- a/JavaScript/test/model/IssueAssignee.spec.js +++ b/JavaScript/test/model/IssueAssignee.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/IssueLabels.spec.js b/JavaScript/test/model/IssueLabels.spec.js index a671685..aa3aaff 100644 --- a/JavaScript/test/model/IssueLabels.spec.js +++ b/JavaScript/test/model/IssueLabels.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/IssueMilestone.spec.js b/JavaScript/test/model/IssueMilestone.spec.js index 1b2d85a..587ac2f 100644 --- a/JavaScript/test/model/IssueMilestone.spec.js +++ b/JavaScript/test/model/IssueMilestone.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Issues.spec.js b/JavaScript/test/model/Issues.spec.js index 1c47d3b..865ab4a 100644 --- a/JavaScript/test/model/Issues.spec.js +++ b/JavaScript/test/model/Issues.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/LabelStudioProjectAccess.spec.js b/JavaScript/test/model/LabelStudioProjectAccess.spec.js new file mode 100644 index 0000000..b8dba00 --- /dev/null +++ b/JavaScript/test/model/LabelStudioProjectAccess.spec.js @@ -0,0 +1,93 @@ +/* + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 3.0.35 + * + * Do not edit the class manually. + * + */ +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', '../../src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require('../../src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.DagsHubApi); + } +}(this, function(expect, DagsHubApi) { + 'use strict'; + + var instance; + + describe('(package)', function() { + describe('LabelStudioProjectAccess', function() { + beforeEach(function() { + instance = new DagsHubApi.LabelStudioProjectAccess(); + }); + + it('should create an instance of LabelStudioProjectAccess', function() { + // TODO: update the code to test LabelStudioProjectAccess + expect(instance).to.be.a(DagsHubApi.LabelStudioProjectAccess); + }); + + it('should have the property id (base name: "id")', function() { + // TODO: update the code to test the property id + expect(instance).to.have.property('id'); + // expect(instance.id).to.be(expectedValueLiteral); + }); + + it('should have the property repoId (base name: "repo_id")', function() { + // TODO: update the code to test the property repoId + expect(instance).to.have.property('repoId'); + // expect(instance.repoId).to.be(expectedValueLiteral); + }); + + it('should have the property projectId (base name: "project_id")', function() { + // TODO: update the code to test the property projectId + expect(instance).to.have.property('projectId'); + // expect(instance.projectId).to.be(expectedValueLiteral); + }); + + it('should have the property userId (base name: "user_id")', function() { + // TODO: update the code to test the property userId + expect(instance).to.have.property('userId'); + // expect(instance.userId).to.be(expectedValueLiteral); + }); + + it('should have the property teamId (base name: "team_id")', function() { + // TODO: update the code to test the property teamId + expect(instance).to.have.property('teamId'); + // expect(instance.teamId).to.be(expectedValueLiteral); + }); + + it('should have the property accessLevel (base name: "access_level")', function() { + // TODO: update the code to test the property accessLevel + expect(instance).to.have.property('accessLevel'); + // expect(instance.accessLevel).to.be(expectedValueLiteral); + }); + + it('should have the property createdUnix (base name: "created_unix")', function() { + // TODO: update the code to test the property createdUnix + expect(instance).to.have.property('createdUnix'); + // expect(instance.createdUnix).to.be(expectedValueLiteral); + }); + + it('should have the property user (base name: "user")', function() { + // TODO: update the code to test the property user + expect(instance).to.have.property('user'); + // expect(instance.user).to.be(expectedValueLiteral); + }); + + }); + }); + +})); diff --git a/JavaScript/test/model/Labels.spec.js b/JavaScript/test/model/Labels.spec.js index 71e213b..12f7e8f 100644 --- a/JavaScript/test/model/Labels.spec.js +++ b/JavaScript/test/model/Labels.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/MigrateRepo.spec.js b/JavaScript/test/model/MigrateRepo.spec.js index b00e3c3..34a570d 100644 --- a/JavaScript/test/model/MigrateRepo.spec.js +++ b/JavaScript/test/model/MigrateRepo.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Milestone.spec.js b/JavaScript/test/model/Milestone.spec.js index a1643b7..2b60837 100644 --- a/JavaScript/test/model/Milestone.spec.js +++ b/JavaScript/test/model/Milestone.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/PatchIssue.spec.js b/JavaScript/test/model/PatchIssue.spec.js index 1a172ce..5a93765 100644 --- a/JavaScript/test/model/PatchIssue.spec.js +++ b/JavaScript/test/model/PatchIssue.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/PostIssue.spec.js b/JavaScript/test/model/PostIssue.spec.js index e2543cb..590f1b2 100644 --- a/JavaScript/test/model/PostIssue.spec.js +++ b/JavaScript/test/model/PostIssue.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/PutFile.spec.js b/JavaScript/test/model/PutFile.spec.js index e42a54f..60d9d1d 100644 --- a/JavaScript/test/model/PutFile.spec.js +++ b/JavaScript/test/model/PutFile.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/RepoHooksBody.spec.js b/JavaScript/test/model/RepoHooksBody.spec.js index bcd26ac..d8c79cc 100644 --- a/JavaScript/test/model/RepoHooksBody.spec.js +++ b/JavaScript/test/model/RepoHooksBody.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/State.spec.js b/JavaScript/test/model/State.spec.js index 1fc33b1..9c061e2 100644 --- a/JavaScript/test/model/State.spec.js +++ b/JavaScript/test/model/State.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/Title.spec.js b/JavaScript/test/model/Title.spec.js index 6083cbe..da45231 100644 --- a/JavaScript/test/model/Title.spec.js +++ b/JavaScript/test/model/Title.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/User.spec.js b/JavaScript/test/model/User.spec.js index 3491c74..500aef9 100644 --- a/JavaScript/test/model/User.spec.js +++ b/JavaScript/test/model/User.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/WebhookConfig.spec.js b/JavaScript/test/model/WebhookConfig.spec.js index 0a3f7a2..fd83b6b 100644 --- a/JavaScript/test/model/WebhookConfig.spec.js +++ b/JavaScript/test/model/WebhookConfig.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/JavaScript/test/model/WebhookEvents.spec.js b/JavaScript/test/model/WebhookEvents.spec.js index ceb937f..012119e 100644 --- a/JavaScript/test/model/WebhookEvents.spec.js +++ b/JavaScript/test/model/WebhookEvents.spec.js @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git diff --git a/Kotlin/README.md b/Kotlin/README.md index 9a5d4cd..ea4f48f 100644 --- a/Kotlin/README.md +++ b/Kotlin/README.md @@ -35,6 +35,14 @@ All URIs are relative to *https://dagshub.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AnnotationsApi* | [**getLabelStudioTeamAccess**](docs/AnnotationsApi.md#getlabelstudioteamaccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +*AnnotationsApi* | [**getLabelStudioUserAccess**](docs/AnnotationsApi.md#getlabelstudiouseraccess) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +*AnnotationsApi* | [**grantLabelStudioTeamAccess**](docs/AnnotationsApi.md#grantlabelstudioteamaccess) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +*AnnotationsApi* | [**grantLabelStudioUserAccess**](docs/AnnotationsApi.md#grantlabelstudiouseraccess) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +*AnnotationsApi* | [**listLabelStudioTeamAccess**](docs/AnnotationsApi.md#listlabelstudioteamaccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +*AnnotationsApi* | [**listLabelStudioUserAccess**](docs/AnnotationsApi.md#listlabelstudiouseraccess) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +*AnnotationsApi* | [**revokeLabelStudioTeamAccess**](docs/AnnotationsApi.md#revokelabelstudioteamaccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +*AnnotationsApi* | [**revokeLabelStudioUserAccess**](docs/AnnotationsApi.md#revokelabelstudiouseraccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects *BranchesApi* | [**getBranch**](docs/BranchesApi.md#getbranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch *BranchesApi* | [**listBranches**](docs/BranchesApi.md#listbranches) | **GET** /repos/{owner}/{repo}/branches | List Branches *CollaboratorsApi* | [**addCollaborator**](docs/CollaboratorsApi.md#addcollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator @@ -55,6 +63,7 @@ Class | Method | HTTP request | Description *IssuesApi* | [**editIssue**](docs/IssuesApi.md#editissue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue *IssuesApi* | [**getIssue**](docs/IssuesApi.md#getissue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue *IssuesApi* | [**listRepoIssues**](docs/IssuesApi.md#listrepoissues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository +*OrganizationsApi* | [**createOrgTeam**](docs/OrganizationsApi.md#createorgteam) | **POST** /admin/orgs/{orgname}/teams | Create an organization team *ReleasesApi* | [**listReleases**](docs/ReleasesApi.md#listreleases) | **GET** /repos/{owner}/{repo}/releases | List Releases *RepositoryApi* | [**createOrgRepo**](docs/RepositoryApi.md#createorgrepo) | **POST** /org/{orgname}/repos | Create in organization *RepositoryApi* | [**createRepo**](docs/RepositoryApi.md#createrepo) | **POST** /user/repos | Create @@ -81,12 +90,15 @@ Class | Method | HTTP request | Description - [io.swagger.client.models.Body](docs/Body.md) - [io.swagger.client.models.Closed](docs/Closed.md) - [io.swagger.client.models.CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) + - [io.swagger.client.models.CreateAnnotatorTeam](docs/CreateAnnotatorTeam.md) - [io.swagger.client.models.CreateRepo](docs/CreateRepo.md) - [io.swagger.client.models.EditExperimentPost](docs/EditExperimentPost.md) - [io.swagger.client.models.ExperimentKeys](docs/ExperimentKeys.md) - [io.swagger.client.models.Files](docs/Files.md) - [io.swagger.client.models.Files1](docs/Files1.md) + - [io.swagger.client.models.GrantLabelStudioAccess](docs/GrantLabelStudioAccess.md) - [io.swagger.client.models.HooksIdBody](docs/HooksIdBody.md) + - [io.swagger.client.models.InlineResponse200](docs/InlineResponse200.md) - [io.swagger.client.models.Integration](docs/Integration.md) - [io.swagger.client.models.IntegrationInner](docs/IntegrationInner.md) - [io.swagger.client.models.Issue](docs/Issue.md) @@ -94,6 +106,7 @@ Class | Method | HTTP request | Description - [io.swagger.client.models.IssueLabels](docs/IssueLabels.md) - [io.swagger.client.models.IssueMilestone](docs/IssueMilestone.md) - [io.swagger.client.models.Issues](docs/Issues.md) + - [io.swagger.client.models.LabelStudioProjectAccess](docs/LabelStudioProjectAccess.md) - [io.swagger.client.models.Labels](docs/Labels.md) - [io.swagger.client.models.MigrateRepo](docs/MigrateRepo.md) - [io.swagger.client.models.Milestone](docs/Milestone.md) diff --git a/Kotlin/docs/AnnotationsApi.md b/Kotlin/docs/AnnotationsApi.md new file mode 100644 index 0000000..cb7c2d7 --- /dev/null +++ b/Kotlin/docs/AnnotationsApi.md @@ -0,0 +1,431 @@ +# AnnotationsApi + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**getLabelStudioTeamAccess**](AnnotationsApi.md#getLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +[**getLabelStudioUserAccess**](AnnotationsApi.md#getLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +[**grantLabelStudioTeamAccess**](AnnotationsApi.md#grantLabelStudioTeamAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +[**grantLabelStudioUserAccess**](AnnotationsApi.md#grantLabelStudioUserAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +[**listLabelStudioTeamAccess**](AnnotationsApi.md#listLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +[**listLabelStudioUserAccess**](AnnotationsApi.md#listLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +[**revokeLabelStudioTeamAccess**](AnnotationsApi.md#revokeLabelStudioTeamAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +[**revokeLabelStudioUserAccess**](AnnotationsApi.md#revokeLabelStudioUserAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects + + +# **getLabelStudioTeamAccess** +> LabelStudioProjectAccess getLabelStudioTeamAccess(owner, repo, teamid, projectId) + +Get team access level for annotation projects + +Get the access level for a specific team and project (or all projects) + +### Example +```kotlin +// Import classes: +//import dagshub_api.infrastructure.* +//import io.swagger.client.models.*; + +val apiInstance = AnnotationsApi() +val owner : kotlin.String = owner_example // kotlin.String | owner of the repository +val repo : kotlin.String = repo_example // kotlin.String | name of the repository +val teamid : kotlin.Long = 789 // kotlin.Long | Team ID +val projectId : kotlin.Long = 789 // kotlin.Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + val result : LabelStudioProjectAccess = apiInstance.getLabelStudioTeamAccess(owner, repo, teamid, projectId) + println(result) +} catch (e: ClientException) { + println("4xx response calling AnnotationsApi#getLabelStudioTeamAccess") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling AnnotationsApi#getLabelStudioTeamAccess") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **kotlin.String**| owner of the repository | + **repo** | **kotlin.String**| name of the repository | + **teamid** | **kotlin.Long**| Team ID | + **projectId** | **kotlin.Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**LabelStudioProjectAccess**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **getLabelStudioUserAccess** +> InlineResponse200 getLabelStudioUserAccess(owner, repo, userid, projectId) + +Get user access level for annotation projects + +Get the access level for a specific user and project (or all projects) + +### Example +```kotlin +// Import classes: +//import dagshub_api.infrastructure.* +//import io.swagger.client.models.*; + +val apiInstance = AnnotationsApi() +val owner : kotlin.String = owner_example // kotlin.String | owner of the repository +val repo : kotlin.String = repo_example // kotlin.String | name of the repository +val userid : kotlin.Long = 789 // kotlin.Long | User ID +val projectId : kotlin.Long = 789 // kotlin.Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + val result : InlineResponse200 = apiInstance.getLabelStudioUserAccess(owner, repo, userid, projectId) + println(result) +} catch (e: ClientException) { + println("4xx response calling AnnotationsApi#getLabelStudioUserAccess") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling AnnotationsApi#getLabelStudioUserAccess") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **kotlin.String**| owner of the repository | + **repo** | **kotlin.String**| name of the repository | + **userid** | **kotlin.Long**| User ID | + **projectId** | **kotlin.Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **grantLabelStudioTeamAccess** +> grantLabelStudioTeamAccess(body, owner, repo, teamid) + +Grant team access to annotation projects + +Grant a team access to specific Label Studio annotation projects (organization repositories only) + +### Example +```kotlin +// Import classes: +//import dagshub_api.infrastructure.* +//import io.swagger.client.models.*; + +val apiInstance = AnnotationsApi() +val body : GrantLabelStudioAccess = // GrantLabelStudioAccess | +val owner : kotlin.String = owner_example // kotlin.String | owner of the repository +val repo : kotlin.String = repo_example // kotlin.String | name of the repository +val teamid : kotlin.Long = 789 // kotlin.Long | Team ID +try { + apiInstance.grantLabelStudioTeamAccess(body, owner, repo, teamid) +} catch (e: ClientException) { + println("4xx response calling AnnotationsApi#grantLabelStudioTeamAccess") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling AnnotationsApi#grantLabelStudioTeamAccess") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **kotlin.String**| owner of the repository | + **repo** | **kotlin.String**| name of the repository | + **teamid** | **kotlin.Long**| Team ID | + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **grantLabelStudioUserAccess** +> grantLabelStudioUserAccess(body, owner, repo, userid) + +Grant user access to annotation projects + +Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + +### Example +```kotlin +// Import classes: +//import dagshub_api.infrastructure.* +//import io.swagger.client.models.*; + +val apiInstance = AnnotationsApi() +val body : GrantLabelStudioAccess = // GrantLabelStudioAccess | +val owner : kotlin.String = owner_example // kotlin.String | owner of the repository +val repo : kotlin.String = repo_example // kotlin.String | name of the repository +val userid : kotlin.Long = 789 // kotlin.Long | User ID +try { + apiInstance.grantLabelStudioUserAccess(body, owner, repo, userid) +} catch (e: ClientException) { + println("4xx response calling AnnotationsApi#grantLabelStudioUserAccess") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling AnnotationsApi#grantLabelStudioUserAccess") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **kotlin.String**| owner of the repository | + **repo** | **kotlin.String**| name of the repository | + **userid** | **kotlin.Long**| User ID | + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + + +# **listLabelStudioTeamAccess** +> kotlin.Array<LabelStudioProjectAccess> listLabelStudioTeamAccess(owner, repo, projectId) + +List team access entries for annotation projects + +Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + +### Example +```kotlin +// Import classes: +//import dagshub_api.infrastructure.* +//import io.swagger.client.models.*; + +val apiInstance = AnnotationsApi() +val owner : kotlin.String = owner_example // kotlin.String | owner of the repository +val repo : kotlin.String = repo_example // kotlin.String | name of the repository +val projectId : kotlin.Long = 789 // kotlin.Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + val result : kotlin.Array = apiInstance.listLabelStudioTeamAccess(owner, repo, projectId) + println(result) +} catch (e: ClientException) { + println("4xx response calling AnnotationsApi#listLabelStudioTeamAccess") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling AnnotationsApi#listLabelStudioTeamAccess") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **kotlin.String**| owner of the repository | + **repo** | **kotlin.String**| name of the repository | + **projectId** | **kotlin.Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**kotlin.Array<LabelStudioProjectAccess>**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **listLabelStudioUserAccess** +> kotlin.Array<LabelStudioProjectAccess> listLabelStudioUserAccess(owner, repo, projectId) + +List user access entries for annotation projects + +Get a list of users with access to Label Studio annotation projects in the repository + +### Example +```kotlin +// Import classes: +//import dagshub_api.infrastructure.* +//import io.swagger.client.models.*; + +val apiInstance = AnnotationsApi() +val owner : kotlin.String = owner_example // kotlin.String | owner of the repository +val repo : kotlin.String = repo_example // kotlin.String | name of the repository +val projectId : kotlin.Long = 789 // kotlin.Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + val result : kotlin.Array = apiInstance.listLabelStudioUserAccess(owner, repo, projectId) + println(result) +} catch (e: ClientException) { + println("4xx response calling AnnotationsApi#listLabelStudioUserAccess") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling AnnotationsApi#listLabelStudioUserAccess") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **kotlin.String**| owner of the repository | + **repo** | **kotlin.String**| name of the repository | + **projectId** | **kotlin.Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**kotlin.Array<LabelStudioProjectAccess>**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +# **revokeLabelStudioTeamAccess** +> revokeLabelStudioTeamAccess(owner, repo, teamid, projectId) + +Revoke team access to annotation projects + +Revoke a team's access to Label Studio annotation projects + +### Example +```kotlin +// Import classes: +//import dagshub_api.infrastructure.* +//import io.swagger.client.models.*; + +val apiInstance = AnnotationsApi() +val owner : kotlin.String = owner_example // kotlin.String | owner of the repository +val repo : kotlin.String = repo_example // kotlin.String | name of the repository +val teamid : kotlin.Long = 789 // kotlin.Long | Team ID +val projectId : kotlin.Long = 789 // kotlin.Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + apiInstance.revokeLabelStudioTeamAccess(owner, repo, teamid, projectId) +} catch (e: ClientException) { + println("4xx response calling AnnotationsApi#revokeLabelStudioTeamAccess") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling AnnotationsApi#revokeLabelStudioTeamAccess") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **kotlin.String**| owner of the repository | + **repo** | **kotlin.String**| name of the repository | + **teamid** | **kotlin.Long**| Team ID | + **projectId** | **kotlin.Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +# **revokeLabelStudioUserAccess** +> revokeLabelStudioUserAccess(owner, repo, userid, projectId) + +Revoke user access to annotation projects + +Revoke a user's access to Label Studio annotation projects + +### Example +```kotlin +// Import classes: +//import dagshub_api.infrastructure.* +//import io.swagger.client.models.*; + +val apiInstance = AnnotationsApi() +val owner : kotlin.String = owner_example // kotlin.String | owner of the repository +val repo : kotlin.String = repo_example // kotlin.String | name of the repository +val userid : kotlin.Long = 789 // kotlin.Long | User ID +val projectId : kotlin.Long = 789 // kotlin.Long | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. +try { + apiInstance.revokeLabelStudioUserAccess(owner, repo, userid, projectId) +} catch (e: ClientException) { + println("4xx response calling AnnotationsApi#revokeLabelStudioUserAccess") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling AnnotationsApi#revokeLabelStudioUserAccess") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **kotlin.String**| owner of the repository | + **repo** | **kotlin.String**| name of the repository | + **userid** | **kotlin.Long**| User ID | + **projectId** | **kotlin.Long**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + diff --git a/Kotlin/docs/CreateAnnotatorTeam.md b/Kotlin/docs/CreateAnnotatorTeam.md new file mode 100644 index 0000000..3be4fa0 --- /dev/null +++ b/Kotlin/docs/CreateAnnotatorTeam.md @@ -0,0 +1,21 @@ +# CreateAnnotatorTeam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | [**kotlin.String**](.md) | Team name | +**description** | [**kotlin.String**](.md) | Team description | [optional] +**teamType** | [**inline**](#TeamTypeEnum) | Type of team - normal teams have repository access, annotator teams only have annotation project access | [optional] +**permission** | [**inline**](#PermissionEnum) | Repository permission level (required for normal teams, ignored for annotator teams) | [optional] + + +## Enum: team_type +Name | Value +---- | ----- +teamType | normal, annotator + + +## Enum: permission +Name | Value +---- | ----- +permission | read, write, admin diff --git a/Kotlin/docs/Files_1.md b/Kotlin/docs/Files_1.md index d2c0740..edeaa82 100644 --- a/Kotlin/docs/Files_1.md +++ b/Kotlin/docs/Files_1.md @@ -4,5 +4,4 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **entries** | [**kotlin.Array<java.io.File>**](java.io.File.md) | | [optional] -**limit** | [**kotlin.Int**](.md) | | [optional] -**nextToken** | [**kotlin.String**](.md) | | [optional] +**nextToken** | [**kotlin.String**](.md) | Next token to continue pagination from | [optional] diff --git a/Kotlin/docs/GrantLabelStudioAccess.md b/Kotlin/docs/GrantLabelStudioAccess.md new file mode 100644 index 0000000..2f7b78a --- /dev/null +++ b/Kotlin/docs/GrantLabelStudioAccess.md @@ -0,0 +1,13 @@ +# GrantLabelStudioAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**projectId** | [**kotlin.Long**](.md) | Project ID, -1 for wildcard access to all projects | +**accessLevel** | [**inline**](#AccessLevelEnum) | Access level to grant | [optional] + + +## Enum: access_level +Name | Value +---- | ----- +accessLevel | annotator, none diff --git a/Kotlin/docs/Inline_response_200.md b/Kotlin/docs/Inline_response_200.md new file mode 100644 index 0000000..afc1d47 --- /dev/null +++ b/Kotlin/docs/Inline_response_200.md @@ -0,0 +1,14 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userId** | [**kotlin.Long**](.md) | | [optional] +**projectId** | [**kotlin.Long**](.md) | | [optional] +**accessLevel** | [**inline**](#AccessLevelEnum) | | [optional] + + +## Enum: access_level +Name | Value +---- | ----- +accessLevel | none, annotator diff --git a/Kotlin/docs/LabelStudioProjectAccess.md b/Kotlin/docs/LabelStudioProjectAccess.md new file mode 100644 index 0000000..aba4786 --- /dev/null +++ b/Kotlin/docs/LabelStudioProjectAccess.md @@ -0,0 +1,19 @@ +# LabelStudioProjectAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | [**kotlin.Long**](.md) | | [optional] +**repoId** | [**kotlin.Long**](.md) | | [optional] +**projectId** | [**kotlin.Long**](.md) | Project ID, -1 means wildcard access to all projects | [optional] +**userId** | [**kotlin.Long**](.md) | User ID (present for user access entries) | [optional] +**teamId** | [**kotlin.Long**](.md) | Team ID (present for team access entries) | [optional] +**accessLevel** | [**inline**](#AccessLevelEnum) | | [optional] +**createdUnix** | [**kotlin.Long**](.md) | | [optional] +**user** | [**User**](User.md) | | [optional] + + +## Enum: access_level +Name | Value +---- | ----- +accessLevel | none, annotator diff --git a/Kotlin/docs/OrganizationsApi.md b/Kotlin/docs/OrganizationsApi.md new file mode 100644 index 0000000..6ed78b1 --- /dev/null +++ b/Kotlin/docs/OrganizationsApi.md @@ -0,0 +1,56 @@ +# OrganizationsApi + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createOrgTeam**](OrganizationsApi.md#createOrgTeam) | **POST** /admin/orgs/{orgname}/teams | Create an organization team + + +# **createOrgTeam** +> createOrgTeam(body, orgname) + +Create an organization team + +Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + +### Example +```kotlin +// Import classes: +//import dagshub_api.infrastructure.* +//import io.swagger.client.models.*; + +val apiInstance = OrganizationsApi() +val body : CreateAnnotatorTeam = // CreateAnnotatorTeam | +val orgname : kotlin.String = orgname_example // kotlin.String | A DagsHub organization name +try { + apiInstance.createOrgTeam(body, orgname) +} catch (e: ClientException) { + println("4xx response calling OrganizationsApi#createOrgTeam") + e.printStackTrace() +} catch (e: ServerException) { + println("5xx response calling OrganizationsApi#createOrgTeam") + e.printStackTrace() +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateAnnotatorTeam**](CreateAnnotatorTeam.md)| | + **orgname** | **kotlin.String**| A DagsHub organization name | + +### Return type + +null (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + diff --git a/Kotlin/docs/StorageIntegrationsApi.md b/Kotlin/docs/StorageIntegrationsApi.md index bd1125d..ac865f9 100644 --- a/Kotlin/docs/StorageIntegrationsApi.md +++ b/Kotlin/docs/StorageIntegrationsApi.md @@ -10,7 +10,7 @@ Method | HTTP request | Description # **getBucketContent** -> Files1 getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken) +> Files1 getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken) List contents in the path @@ -28,9 +28,10 @@ val bucket : kotlin.String = bucket_example // kotlin.String | name and prefix o val path : kotlin.String = path_example // kotlin.String | path of a folder in the repository val includeSize : kotlin.Boolean = true // kotlin.Boolean | val limit : kotlin.Int = 56 // kotlin.Int | Maximum amount of items to return -val fromToken : kotlin.String = fromToken_example // kotlin.String | Token, from which to continue iteration +val paging : kotlin.Boolean = true // kotlin.Boolean | Whether or not paging is enabled +val fromToken : kotlin.String = fromToken_example // kotlin.String | [Only if paging is enabled] token, from which to continue iteration try { - val result : Files1 = apiInstance.getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken) + val result : Files1 = apiInstance.getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken) println(result) } catch (e: ClientException) { println("4xx response calling StorageIntegrationsApi#getBucketContent") @@ -52,7 +53,8 @@ Name | Type | Description | Notes **path** | **kotlin.String**| path of a folder in the repository | **includeSize** | **kotlin.Boolean**| | [optional] [default to false] **limit** | **kotlin.Int**| Maximum amount of items to return | [optional] [default to 100] - **fromToken** | **kotlin.String**| Token, from which to continue iteration | [optional] + **paging** | **kotlin.Boolean**| Whether or not paging is enabled | [optional] [default to false] + **fromToken** | **kotlin.String**| [Only if paging is enabled] token, from which to continue iteration | [optional] ### Return type diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/AnnotationsApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/AnnotationsApi.kt new file mode 100644 index 0000000..82d7f9c --- /dev/null +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/AnnotationsApi.kt @@ -0,0 +1,242 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.apis + +import io.swagger.client.models.GrantLabelStudioAccess +import io.swagger.client.models.InlineResponse200 +import io.swagger.client.models.LabelStudioProjectAccess + +import dagshub_api.infrastructure.* + +class AnnotationsApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { + + /** + * Get team access level for annotation projects + * Get the access level for a specific team and project (or all projects) + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return LabelStudioProjectAccess + */ + @Suppress("UNCHECKED_CAST") + fun getLabelStudioTeamAccess(owner: kotlin.String, repo: kotlin.String, teamid: kotlin.Long, projectId: kotlin.Long? = null): LabelStudioProjectAccess { + val localVariableQuery: MultiValueMap = mapOf("project_id" to listOf("$projectId")) + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/repos/{owner}/{repo}/annotations/access/teams/{teamid}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "teamid" + "}", "$teamid"), query = localVariableQuery + ) + val response = request( + localVariableConfig + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as LabelStudioProjectAccess + ResponseType.Informational -> TODO() + ResponseType.Redirection -> TODO() + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + /** + * Get user access level for annotation projects + * Get the access level for a specific user and project (or all projects) + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return InlineResponse200 + */ + @Suppress("UNCHECKED_CAST") + fun getLabelStudioUserAccess(owner: kotlin.String, repo: kotlin.String, userid: kotlin.Long, projectId: kotlin.Long? = null): InlineResponse200 { + val localVariableQuery: MultiValueMap = mapOf("project_id" to listOf("$projectId")) + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/repos/{owner}/{repo}/annotations/access/users/{userid}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "userid" + "}", "$userid"), query = localVariableQuery + ) + val response = request( + localVariableConfig + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as InlineResponse200 + ResponseType.Informational -> TODO() + ResponseType.Redirection -> TODO() + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + /** + * Grant team access to annotation projects + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * @param body + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @return void + */ + fun grantLabelStudioTeamAccess(body: GrantLabelStudioAccess, owner: kotlin.String, repo: kotlin.String, teamid: kotlin.Long): Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableConfig = RequestConfig( + RequestMethod.PUT, + "/repos/{owner}/{repo}/annotations/access/teams/{teamid}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "teamid" + "}", "$teamid"), query = localVariableQuery + ) + val response = request( + localVariableConfig, localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> TODO() + ResponseType.Redirection -> TODO() + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + /** + * Grant user access to annotation projects + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * @param body + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @return void + */ + fun grantLabelStudioUserAccess(body: GrantLabelStudioAccess, owner: kotlin.String, repo: kotlin.String, userid: kotlin.Long): Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableConfig = RequestConfig( + RequestMethod.PUT, + "/repos/{owner}/{repo}/annotations/access/users/{userid}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "userid" + "}", "$userid"), query = localVariableQuery + ) + val response = request( + localVariableConfig, localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> TODO() + ResponseType.Redirection -> TODO() + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + /** + * List team access entries for annotation projects + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * @param owner owner of the repository + * @param repo name of the repository + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return kotlin.Array + */ + @Suppress("UNCHECKED_CAST") + fun listLabelStudioTeamAccess(owner: kotlin.String, repo: kotlin.String, projectId: kotlin.Long? = null): kotlin.Array { + val localVariableQuery: MultiValueMap = mapOf("project_id" to listOf("$projectId")) + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/repos/{owner}/{repo}/annotations/access/teams".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery + ) + val response = request>( + localVariableConfig + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as kotlin.Array + ResponseType.Informational -> TODO() + ResponseType.Redirection -> TODO() + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + /** + * List user access entries for annotation projects + * Get a list of users with access to Label Studio annotation projects in the repository + * @param owner owner of the repository + * @param repo name of the repository + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return kotlin.Array + */ + @Suppress("UNCHECKED_CAST") + fun listLabelStudioUserAccess(owner: kotlin.String, repo: kotlin.String, projectId: kotlin.Long? = null): kotlin.Array { + val localVariableQuery: MultiValueMap = mapOf("project_id" to listOf("$projectId")) + val localVariableConfig = RequestConfig( + RequestMethod.GET, + "/repos/{owner}/{repo}/annotations/access/users".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo"), query = localVariableQuery + ) + val response = request>( + localVariableConfig + ) + + return when (response.responseType) { + ResponseType.Success -> (response as Success<*>).data as kotlin.Array + ResponseType.Informational -> TODO() + ResponseType.Redirection -> TODO() + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + /** + * Revoke team access to annotation projects + * Revoke a team's access to Label Studio annotation projects + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return void + */ + fun revokeLabelStudioTeamAccess(owner: kotlin.String, repo: kotlin.String, teamid: kotlin.Long, projectId: kotlin.Long? = null): Unit { + val localVariableQuery: MultiValueMap = mapOf("project_id" to listOf("$projectId")) + val localVariableConfig = RequestConfig( + RequestMethod.DELETE, + "/repos/{owner}/{repo}/annotations/access/teams/{teamid}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "teamid" + "}", "$teamid"), query = localVariableQuery + ) + val response = request( + localVariableConfig + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> TODO() + ResponseType.Redirection -> TODO() + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } + /** + * Revoke user access to annotation projects + * Revoke a user's access to Label Studio annotation projects + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return void + */ + fun revokeLabelStudioUserAccess(owner: kotlin.String, repo: kotlin.String, userid: kotlin.Long, projectId: kotlin.Long? = null): Unit { + val localVariableQuery: MultiValueMap = mapOf("project_id" to listOf("$projectId")) + val localVariableConfig = RequestConfig( + RequestMethod.DELETE, + "/repos/{owner}/{repo}/annotations/access/users/{userid}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "userid" + "}", "$userid"), query = localVariableQuery + ) + val response = request( + localVariableConfig + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> TODO() + ResponseType.Redirection -> TODO() + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } +} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/BranchesApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/BranchesApi.kt index ffc96d1..e047340 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/BranchesApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/BranchesApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/CollaboratorsApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/CollaboratorsApi.kt index 2d023ad..7bd802e 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/CollaboratorsApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/CollaboratorsApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/CommitsApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/CommitsApi.kt index d7c15bc..c1c80d3 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/CommitsApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/CommitsApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/ContentApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/ContentApi.kt index bf13ee2..6086846 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/ContentApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/ContentApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/ExperimentsApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/ExperimentsApi.kt index 78d6c8e..4a290e0 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/ExperimentsApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/ExperimentsApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/IssuesApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/IssuesApi.kt index 73be0af..84e6c2f 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/IssuesApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/IssuesApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/OrganizationsApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/OrganizationsApi.kt new file mode 100644 index 0000000..d520f7c --- /dev/null +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/OrganizationsApi.kt @@ -0,0 +1,46 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.apis + +import io.swagger.client.models.CreateAnnotatorTeam + +import dagshub_api.infrastructure.* + +class OrganizationsApi(basePath: kotlin.String = "https://dagshub.com/api/v1") : ApiClient(basePath) { + + /** + * Create an organization team + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * @param body + * @param orgname A DagsHub organization name + * @return void + */ + fun createOrgTeam(body: CreateAnnotatorTeam, orgname: kotlin.String): Unit { + val localVariableBody: kotlin.Any? = body + val localVariableQuery: MultiValueMap = mapOf() + val localVariableConfig = RequestConfig( + RequestMethod.POST, + "/admin/orgs/{orgname}/teams".replace("{" + "orgname" + "}", "$orgname"), query = localVariableQuery + ) + val response = request( + localVariableConfig, localVariableBody + ) + + return when (response.responseType) { + ResponseType.Success -> Unit + ResponseType.Informational -> TODO() + ResponseType.Redirection -> TODO() + ResponseType.ClientError -> throw ClientException((response as ClientError<*>).body as? String ?: "Client error") + ResponseType.ServerError -> throw ServerException((response as ServerError<*>).message ?: "Server error") + } + } +} diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/ReleasesApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/ReleasesApi.kt index 45a93b9..dabc0a1 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/ReleasesApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/ReleasesApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/RepositoryApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/RepositoryApi.kt index eeb9d52..87c0c38 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/RepositoryApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/RepositoryApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/StorageIntegrationsApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/StorageIntegrationsApi.kt index b11f49d..96b8cc5 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/StorageIntegrationsApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/StorageIntegrationsApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -28,12 +28,13 @@ class StorageIntegrationsApi(basePath: kotlin.String = "https://dagshub.com/api/ * @param path path of a folder in the repository * @param includeSize (optional, default to false) * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) + * @param paging Whether or not paging is enabled (optional, default to false) + * @param fromToken [Only if paging is enabled] token, from which to continue iteration (optional) * @return Files1 */ @Suppress("UNCHECKED_CAST") - fun getBucketContent(owner: kotlin.String, repo: kotlin.String, protocol: kotlin.String, bucket: kotlin.String, path: kotlin.String, includeSize: kotlin.Boolean? = null, limit: kotlin.Int? = null, fromToken: kotlin.String? = null): Files1 { - val localVariableQuery: MultiValueMap = mapOf("include_size" to listOf("$includeSize"), "limit" to listOf("$limit"), "from_token" to listOf("$fromToken")) + fun getBucketContent(owner: kotlin.String, repo: kotlin.String, protocol: kotlin.String, bucket: kotlin.String, path: kotlin.String, includeSize: kotlin.Boolean? = null, limit: kotlin.Int? = null, paging: kotlin.Boolean? = null, fromToken: kotlin.String? = null): Files1 { + val localVariableQuery: MultiValueMap = mapOf("include_size" to listOf("$includeSize"), "limit" to listOf("$limit"), "paging" to listOf("$paging"), "from_token" to listOf("$fromToken")) val localVariableConfig = RequestConfig( RequestMethod.GET, "/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}".replace("{" + "owner" + "}", "$owner").replace("{" + "repo" + "}", "$repo").replace("{" + "protocol" + "}", "$protocol").replace("{" + "bucket" + "}", "$bucket").replace("{" + "path" + "}", "$path"), query = localVariableQuery diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/UserApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/UserApi.kt index 651c65a..10bf247 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/UserApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/UserApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/apis/WebhooksApi.kt b/Kotlin/src/main/kotlin/io/swagger/client/apis/WebhooksApi.kt index 3cfa75b..3b9dc7a 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/apis/WebhooksApi.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/apis/WebhooksApi.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Assignee.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Assignee.kt index 3e11e1e..7a3db34 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Assignee.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Assignee.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Body.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Body.kt index 47afab8..c940b9d 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Body.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Body.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Closed.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Closed.kt index 8445901..bdd1707 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Closed.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Closed.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Collaborators_collaborator_body.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Collaborators_collaborator_body.kt index 4b19c19..3963745 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Collaborators_collaborator_body.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Collaborators_collaborator_body.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/CreateAnnotatorTeam.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/CreateAnnotatorTeam.kt new file mode 100644 index 0000000..8b98323 --- /dev/null +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/CreateAnnotatorTeam.kt @@ -0,0 +1,50 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.models + + +/** + * + * @param name Team name + * @param description Team description + * @param teamType Type of team - normal teams have repository access, annotator teams only have annotation project access + * @param permission Repository permission level (required for normal teams, ignored for annotator teams) + */ +data class CreateAnnotatorTeam ( + + /* Team name */ + val name: kotlin.String, + /* Team description */ + val description: kotlin.String? = null, + /* Type of team - normal teams have repository access, annotator teams only have annotation project access */ + val teamType: CreateAnnotatorTeam.TeamType? = null, + /* Repository permission level (required for normal teams, ignored for annotator teams) */ + val permission: CreateAnnotatorTeam.Permission? = null +) { + /** + * Type of team - normal teams have repository access, annotator teams only have annotation project access + * Values: NORMAL,ANNOTATOR + */ + enum class TeamType(val value: kotlin.String){ + NORMAL("normal"), + ANNOTATOR("annotator"); + } + /** + * Repository permission level (required for normal teams, ignored for annotator teams) + * Values: READ,WRITE,ADMIN + */ + enum class Permission(val value: kotlin.String){ + READ("read"), + WRITE("write"), + ADMIN("admin"); + } +} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/CreateRepo.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/CreateRepo.kt index ccc7e91..af28469 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/CreateRepo.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/CreateRepo.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/EditExperimentPost.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/EditExperimentPost.kt index d045e81..94da99b 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/EditExperimentPost.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/EditExperimentPost.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentKeys.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentKeys.kt index c10bc75..a4c054c 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentKeys.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/ExperimentKeys.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Files.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Files.kt index e81a5da..ba3caf6 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Files.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Files.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Files_1.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Files_1.kt index d04c64c..02e06b9 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Files_1.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Files_1.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -15,13 +15,12 @@ package io.swagger.client.models /** * * @param entries - * @param limit - * @param nextToken + * @param nextToken Next token to continue pagination from */ data class Files1 ( val entries: kotlin.Array? = null, - val limit: kotlin.Int? = null, + /* Next token to continue pagination from */ val nextToken: kotlin.String? = null ) { } \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/GrantLabelStudioAccess.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/GrantLabelStudioAccess.kt new file mode 100644 index 0000000..25f66ad --- /dev/null +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/GrantLabelStudioAccess.kt @@ -0,0 +1,35 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.models + + +/** + * + * @param projectId Project ID, -1 for wildcard access to all projects + * @param accessLevel Access level to grant + */ +data class GrantLabelStudioAccess ( + + /* Project ID, -1 for wildcard access to all projects */ + val projectId: kotlin.Long, + /* Access level to grant */ + val accessLevel: GrantLabelStudioAccess.AccessLevel? = null +) { + /** + * Access level to grant + * Values: ANNOTATOR,NONE + */ + enum class AccessLevel(val value: kotlin.String){ + ANNOTATOR("annotator"), + NONE("none"); + } +} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Hooks_id_body.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Hooks_id_body.kt index 7bf8099..517fd8e 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Hooks_id_body.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Hooks_id_body.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Inline_response_200.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Inline_response_200.kt new file mode 100644 index 0000000..6b7c812 --- /dev/null +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Inline_response_200.kt @@ -0,0 +1,35 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.models + + +/** + * + * @param userId + * @param projectId + * @param accessLevel + */ +data class InlineResponse200 ( + + val userId: kotlin.Long? = null, + val projectId: kotlin.Long? = null, + val accessLevel: InlineResponse200.AccessLevel? = null +) { + /** + * + * Values: NONE,ANNOTATOR + */ + enum class AccessLevel(val value: kotlin.String){ + NONE("none"), + ANNOTATOR("annotator"); + } +} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Integration.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Integration.kt index 40e3e47..6dfebb0 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Integration.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Integration.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Integration_inner.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Integration_inner.kt index acd6996..7db8c3e 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Integration_inner.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Integration_inner.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue.kt index a30de7d..72511bf 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_assignee.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_assignee.kt index 090cd33..f9e6b2f 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_assignee.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_assignee.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_labels.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_labels.kt index 0138cc8..0ef24e0 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_labels.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_labels.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_milestone.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_milestone.kt index 4ad4633..83cd13a 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_milestone.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Issue_milestone.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Issues.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Issues.kt index e3d4521..2fb7a43 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Issues.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Issues.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/LabelStudioProjectAccess.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/LabelStudioProjectAccess.kt new file mode 100644 index 0000000..274f530 --- /dev/null +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/LabelStudioProjectAccess.kt @@ -0,0 +1,49 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.models + +import io.swagger.client.models.User + +/** + * + * @param id + * @param repoId + * @param projectId Project ID, -1 means wildcard access to all projects + * @param userId User ID (present for user access entries) + * @param teamId Team ID (present for team access entries) + * @param accessLevel + * @param createdUnix + * @param user + */ +data class LabelStudioProjectAccess ( + + val id: kotlin.Long? = null, + val repoId: kotlin.Long? = null, + /* Project ID, -1 means wildcard access to all projects */ + val projectId: kotlin.Long? = null, + /* User ID (present for user access entries) */ + val userId: kotlin.Long? = null, + /* Team ID (present for team access entries) */ + val teamId: kotlin.Long? = null, + val accessLevel: LabelStudioProjectAccess.AccessLevel? = null, + val createdUnix: kotlin.Long? = null, + val user: User? = null +) { + /** + * + * Values: NONE,ANNOTATOR + */ + enum class AccessLevel(val value: kotlin.String){ + NONE("none"), + ANNOTATOR("annotator"); + } +} \ No newline at end of file diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Labels.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Labels.kt index 43de279..e6076f4 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Labels.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Labels.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/MigrateRepo.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/MigrateRepo.kt index ac0c8f9..3567806 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/MigrateRepo.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/MigrateRepo.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Milestone.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Milestone.kt index 3d54032..de367b7 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Milestone.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Milestone.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/PatchIssue.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/PatchIssue.kt index 4bba50e..d914a78 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/PatchIssue.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/PatchIssue.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/PostIssue.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/PostIssue.kt index 6e6caf0..71fa72a 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/PostIssue.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/PostIssue.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/PutFile.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/PutFile.kt index 3c698a8..314e3c3 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/PutFile.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/PutFile.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Repo_hooks_body.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Repo_hooks_body.kt index 8f939ae..704a4e2 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Repo_hooks_body.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Repo_hooks_body.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/State.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/State.kt index 5580d38..aca5f83 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/State.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/State.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/Title.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/Title.kt index 35b20be..c088aad 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/Title.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/Title.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/User.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/User.kt index 2fa4c2c..17bdebd 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/User.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/User.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookConfig.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookConfig.kt index d8b056e..951aa64 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookConfig.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookConfig.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookEvents.kt b/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookEvents.kt index 4ba5f4b..1036e10 100644 --- a/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookEvents.kt +++ b/Kotlin/src/main/kotlin/io/swagger/client/models/WebhookEvents.kt @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Python/README.md b/Python/README.md index e96adb5..6ea58e7 100644 --- a/Python/README.md +++ b/Python/README.md @@ -3,7 +3,7 @@ This API provides a way to retrive & interact with data about DagsHub repositori This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API version: 1.0.2 +- API version: 1.0.3 - Package version: 1.0.3 - Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen @@ -61,16 +61,18 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # configuration.api_key_prefix['token'] = 'Bearer' # create an instance of the API class -api_instance = dagshub_api.BranchesApi(dagshub_api.ApiClient(configuration)) +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repository repo = 'repo_example' # str | name of the repository -branch = 'branch_example' # str | branch of the repository +teamid = 789 # int | Team ID +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) try: - # Get Branch - api_instance.get_branch(owner, repo, branch) + # Get team access level for annotation projects + api_response = api_instance.get_label_studio_team_access(owner, repo, teamid, project_id=project_id) + pprint(api_response) except ApiException as e: - print("Exception when calling BranchesApi->get_branch: %s\n" % e) + print("Exception when calling AnnotationsApi->get_label_studio_team_access: %s\n" % e) # Configure HTTP basic authorization: basicAuth configuration = dagshub_api.Configuration() configuration.username = 'YOUR_USERNAME' @@ -82,15 +84,150 @@ configuration.api_key['token'] = 'YOUR_API_KEY' # configuration.api_key_prefix['token'] = 'Bearer' # create an instance of the API class -api_instance = dagshub_api.BranchesApi(dagshub_api.ApiClient(configuration)) +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) owner = 'owner_example' # str | owner of the repository repo = 'repo_example' # str | name of the repository +userid = 789 # int | User ID +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) try: - # List Branches - api_instance.list_branches(owner, repo) + # Get user access level for annotation projects + api_response = api_instance.get_label_studio_user_access(owner, repo, userid, project_id=project_id) + pprint(api_response) except ApiException as e: - print("Exception when calling BranchesApi->list_branches: %s\n" % e) + print("Exception when calling AnnotationsApi->get_label_studio_user_access: %s\n" % e) +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +body = dagshub_api.GrantLabelStudioAccess() # GrantLabelStudioAccess | +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +teamid = 789 # int | Team ID + +try: + # Grant team access to annotation projects + api_instance.grant_label_studio_team_access(body, owner, repo, teamid) +except ApiException as e: + print("Exception when calling AnnotationsApi->grant_label_studio_team_access: %s\n" % e) +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +body = dagshub_api.GrantLabelStudioAccess() # GrantLabelStudioAccess | +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +userid = 789 # int | User ID + +try: + # Grant user access to annotation projects + api_instance.grant_label_studio_user_access(body, owner, repo, userid) +except ApiException as e: + print("Exception when calling AnnotationsApi->grant_label_studio_user_access: %s\n" % e) +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + +try: + # List team access entries for annotation projects + api_response = api_instance.list_label_studio_team_access(owner, repo, project_id=project_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AnnotationsApi->list_label_studio_team_access: %s\n" % e) +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + +try: + # List user access entries for annotation projects + api_response = api_instance.list_label_studio_user_access(owner, repo, project_id=project_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AnnotationsApi->list_label_studio_user_access: %s\n" % e) +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +teamid = 789 # int | Team ID +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + +try: + # Revoke team access to annotation projects + api_instance.revoke_label_studio_team_access(owner, repo, teamid, project_id=project_id) +except ApiException as e: + print("Exception when calling AnnotationsApi->revoke_label_studio_team_access: %s\n" % e) +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +userid = 789 # int | User ID +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + +try: + # Revoke user access to annotation projects + api_instance.revoke_label_studio_user_access(owner, repo, userid, project_id=project_id) +except ApiException as e: + print("Exception when calling AnnotationsApi->revoke_label_studio_user_access: %s\n" % e) ``` ## Documentation for API Endpoints @@ -99,6 +236,14 @@ All URIs are relative to *https://dagshub.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AnnotationsApi* | [**get_label_studio_team_access**](docs/AnnotationsApi.md#get_label_studio_team_access) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +*AnnotationsApi* | [**get_label_studio_user_access**](docs/AnnotationsApi.md#get_label_studio_user_access) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +*AnnotationsApi* | [**grant_label_studio_team_access**](docs/AnnotationsApi.md#grant_label_studio_team_access) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +*AnnotationsApi* | [**grant_label_studio_user_access**](docs/AnnotationsApi.md#grant_label_studio_user_access) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +*AnnotationsApi* | [**list_label_studio_team_access**](docs/AnnotationsApi.md#list_label_studio_team_access) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +*AnnotationsApi* | [**list_label_studio_user_access**](docs/AnnotationsApi.md#list_label_studio_user_access) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +*AnnotationsApi* | [**revoke_label_studio_team_access**](docs/AnnotationsApi.md#revoke_label_studio_team_access) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +*AnnotationsApi* | [**revoke_label_studio_user_access**](docs/AnnotationsApi.md#revoke_label_studio_user_access) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects *BranchesApi* | [**get_branch**](docs/BranchesApi.md#get_branch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch *BranchesApi* | [**list_branches**](docs/BranchesApi.md#list_branches) | **GET** /repos/{owner}/{repo}/branches | List Branches *CollaboratorsApi* | [**add_collaborator**](docs/CollaboratorsApi.md#add_collaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator @@ -119,6 +264,7 @@ Class | Method | HTTP request | Description *IssuesApi* | [**edit_issue**](docs/IssuesApi.md#edit_issue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue *IssuesApi* | [**get_issue**](docs/IssuesApi.md#get_issue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue *IssuesApi* | [**list_repo_issues**](docs/IssuesApi.md#list_repo_issues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository +*OrganizationsApi* | [**create_org_team**](docs/OrganizationsApi.md#create_org_team) | **POST** /admin/orgs/{orgname}/teams | Create an organization team *ReleasesApi* | [**list_releases**](docs/ReleasesApi.md#list_releases) | **GET** /repos/{owner}/{repo}/releases | List Releases *RepositoryApi* | [**create_org_repo**](docs/RepositoryApi.md#create_org_repo) | **POST** /org/{orgname}/repos | Create in organization *RepositoryApi* | [**create_repo**](docs/RepositoryApi.md#create_repo) | **POST** /user/repos | Create @@ -144,13 +290,16 @@ Class | Method | HTTP request | Description - [Body](docs/Body.md) - [Closed](docs/Closed.md) - [CollaboratorsCollaboratorBody](docs/CollaboratorsCollaboratorBody.md) + - [CreateAnnotatorTeam](docs/CreateAnnotatorTeam.md) - [CreateRepo](docs/CreateRepo.md) - [EditExperimentPost](docs/EditExperimentPost.md) - [ExperimentKeys](docs/ExperimentKeys.md) - [File](docs/File.md) - [Files](docs/Files.md) - [Files1](docs/Files1.md) + - [GrantLabelStudioAccess](docs/GrantLabelStudioAccess.md) - [HooksIdBody](docs/HooksIdBody.md) + - [InlineResponse200](docs/InlineResponse200.md) - [Integration](docs/Integration.md) - [IntegrationInner](docs/IntegrationInner.md) - [Issue](docs/Issue.md) @@ -158,6 +307,7 @@ Class | Method | HTTP request | Description - [IssueLabels](docs/IssueLabels.md) - [IssueMilestone](docs/IssueMilestone.md) - [Issues](docs/Issues.md) + - [LabelStudioProjectAccess](docs/LabelStudioProjectAccess.md) - [Labels](docs/Labels.md) - [MigrateRepo](docs/MigrateRepo.md) - [Milestone](docs/Milestone.md) diff --git a/Python/dagshub_api/__init__.py b/Python/dagshub_api/__init__.py index 3e1e284..920a2b0 100644 --- a/Python/dagshub_api/__init__.py +++ b/Python/dagshub_api/__init__.py @@ -7,7 +7,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,12 +15,14 @@ from __future__ import absolute_import # import apis into sdk package +from dagshub_api.api.annotations_api import AnnotationsApi from dagshub_api.api.branches_api import BranchesApi from dagshub_api.api.collaborators_api import CollaboratorsApi from dagshub_api.api.commits_api import CommitsApi from dagshub_api.api.content_api import ContentApi from dagshub_api.api.experiments_api import ExperimentsApi from dagshub_api.api.issues_api import IssuesApi +from dagshub_api.api.organizations_api import OrganizationsApi from dagshub_api.api.releases_api import ReleasesApi from dagshub_api.api.repository_api import RepositoryApi from dagshub_api.api.storage_integrations_api import StorageIntegrationsApi @@ -34,13 +36,16 @@ from dagshub_api.models.body import Body from dagshub_api.models.closed import Closed from dagshub_api.models.collaborators_collaborator_body import CollaboratorsCollaboratorBody +from dagshub_api.models.create_annotator_team import CreateAnnotatorTeam from dagshub_api.models.create_repo import CreateRepo from dagshub_api.models.edit_experiment_post import EditExperimentPost from dagshub_api.models.experiment_keys import ExperimentKeys from dagshub_api.models.file import File from dagshub_api.models.files import Files from dagshub_api.models.files1 import Files1 +from dagshub_api.models.grant_label_studio_access import GrantLabelStudioAccess from dagshub_api.models.hooks_id_body import HooksIdBody +from dagshub_api.models.inline_response200 import InlineResponse200 from dagshub_api.models.integration import Integration from dagshub_api.models.integration_inner import IntegrationInner from dagshub_api.models.issue import Issue @@ -48,6 +53,7 @@ from dagshub_api.models.issue_labels import IssueLabels from dagshub_api.models.issue_milestone import IssueMilestone from dagshub_api.models.issues import Issues +from dagshub_api.models.label_studio_project_access import LabelStudioProjectAccess from dagshub_api.models.labels import Labels from dagshub_api.models.migrate_repo import MigrateRepo from dagshub_api.models.milestone import Milestone diff --git a/Python/dagshub_api/api/__init__.py b/Python/dagshub_api/api/__init__.py index b7e9018..b76aee1 100644 --- a/Python/dagshub_api/api/__init__.py +++ b/Python/dagshub_api/api/__init__.py @@ -3,12 +3,14 @@ # flake8: noqa # import apis into api package +from dagshub_api.api.annotations_api import AnnotationsApi from dagshub_api.api.branches_api import BranchesApi from dagshub_api.api.collaborators_api import CollaboratorsApi from dagshub_api.api.commits_api import CommitsApi from dagshub_api.api.content_api import ContentApi from dagshub_api.api.experiments_api import ExperimentsApi from dagshub_api.api.issues_api import IssuesApi +from dagshub_api.api.organizations_api import OrganizationsApi from dagshub_api.api.releases_api import ReleasesApi from dagshub_api.api.repository_api import RepositoryApi from dagshub_api.api.storage_integrations_api import StorageIntegrationsApi diff --git a/Python/dagshub_api/api/annotations_api.py b/Python/dagshub_api/api/annotations_api.py new file mode 100644 index 0000000..b0624f3 --- /dev/null +++ b/Python/dagshub_api/api/annotations_api.py @@ -0,0 +1,937 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from dagshub_api.api_client import ApiClient + + +class AnnotationsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def get_label_studio_team_access(self, owner, repo, teamid, **kwargs): # noqa: E501 + """Get team access level for annotation projects # noqa: E501 + + Get the access level for a specific team and project (or all projects) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_label_studio_team_access(owner, repo, teamid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int teamid: Team ID (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: LabelStudioProjectAccess + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_label_studio_team_access_with_http_info(owner, repo, teamid, **kwargs) # noqa: E501 + else: + (data) = self.get_label_studio_team_access_with_http_info(owner, repo, teamid, **kwargs) # noqa: E501 + return data + + def get_label_studio_team_access_with_http_info(self, owner, repo, teamid, **kwargs): # noqa: E501 + """Get team access level for annotation projects # noqa: E501 + + Get the access level for a specific team and project (or all projects) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_label_studio_team_access_with_http_info(owner, repo, teamid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int teamid: Team ID (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: LabelStudioProjectAccess + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'teamid', 'project_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_label_studio_team_access" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `get_label_studio_team_access`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `get_label_studio_team_access`") # noqa: E501 + # verify the required parameter 'teamid' is set + if ('teamid' not in params or + params['teamid'] is None): + raise ValueError("Missing the required parameter `teamid` when calling `get_label_studio_team_access`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'teamid' in params: + path_params['teamid'] = params['teamid'] # noqa: E501 + + query_params = [] + if 'project_id' in params: + query_params.append(('project_id', params['project_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/annotations/access/teams/{teamid}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='LabelStudioProjectAccess', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def get_label_studio_user_access(self, owner, repo, userid, **kwargs): # noqa: E501 + """Get user access level for annotation projects # noqa: E501 + + Get the access level for a specific user and project (or all projects) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_label_studio_user_access(owner, repo, userid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int userid: User ID (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.get_label_studio_user_access_with_http_info(owner, repo, userid, **kwargs) # noqa: E501 + else: + (data) = self.get_label_studio_user_access_with_http_info(owner, repo, userid, **kwargs) # noqa: E501 + return data + + def get_label_studio_user_access_with_http_info(self, owner, repo, userid, **kwargs): # noqa: E501 + """Get user access level for annotation projects # noqa: E501 + + Get the access level for a specific user and project (or all projects) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.get_label_studio_user_access_with_http_info(owner, repo, userid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int userid: User ID (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: InlineResponse200 + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'userid', 'project_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method get_label_studio_user_access" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `get_label_studio_user_access`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `get_label_studio_user_access`") # noqa: E501 + # verify the required parameter 'userid' is set + if ('userid' not in params or + params['userid'] is None): + raise ValueError("Missing the required parameter `userid` when calling `get_label_studio_user_access`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'userid' in params: + path_params['userid'] = params['userid'] # noqa: E501 + + query_params = [] + if 'project_id' in params: + query_params.append(('project_id', params['project_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/annotations/access/users/{userid}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='InlineResponse200', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def grant_label_studio_team_access(self, body, owner, repo, teamid, **kwargs): # noqa: E501 + """Grant team access to annotation projects # noqa: E501 + + Grant a team access to specific Label Studio annotation projects (organization repositories only) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.grant_label_studio_team_access(body, owner, repo, teamid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GrantLabelStudioAccess body: (required) + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int teamid: Team ID (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.grant_label_studio_team_access_with_http_info(body, owner, repo, teamid, **kwargs) # noqa: E501 + else: + (data) = self.grant_label_studio_team_access_with_http_info(body, owner, repo, teamid, **kwargs) # noqa: E501 + return data + + def grant_label_studio_team_access_with_http_info(self, body, owner, repo, teamid, **kwargs): # noqa: E501 + """Grant team access to annotation projects # noqa: E501 + + Grant a team access to specific Label Studio annotation projects (organization repositories only) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.grant_label_studio_team_access_with_http_info(body, owner, repo, teamid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GrantLabelStudioAccess body: (required) + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int teamid: Team ID (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'owner', 'repo', 'teamid'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method grant_label_studio_team_access" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `grant_label_studio_team_access`") # noqa: E501 + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `grant_label_studio_team_access`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `grant_label_studio_team_access`") # noqa: E501 + # verify the required parameter 'teamid' is set + if ('teamid' not in params or + params['teamid'] is None): + raise ValueError("Missing the required parameter `teamid` when calling `grant_label_studio_team_access`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'teamid' in params: + path_params['teamid'] = params['teamid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/annotations/access/teams/{teamid}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def grant_label_studio_user_access(self, body, owner, repo, userid, **kwargs): # noqa: E501 + """Grant user access to annotation projects # noqa: E501 + + Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.grant_label_studio_user_access(body, owner, repo, userid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GrantLabelStudioAccess body: (required) + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int userid: User ID (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.grant_label_studio_user_access_with_http_info(body, owner, repo, userid, **kwargs) # noqa: E501 + else: + (data) = self.grant_label_studio_user_access_with_http_info(body, owner, repo, userid, **kwargs) # noqa: E501 + return data + + def grant_label_studio_user_access_with_http_info(self, body, owner, repo, userid, **kwargs): # noqa: E501 + """Grant user access to annotation projects # noqa: E501 + + Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.grant_label_studio_user_access_with_http_info(body, owner, repo, userid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param GrantLabelStudioAccess body: (required) + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int userid: User ID (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'owner', 'repo', 'userid'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method grant_label_studio_user_access" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `grant_label_studio_user_access`") # noqa: E501 + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `grant_label_studio_user_access`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `grant_label_studio_user_access`") # noqa: E501 + # verify the required parameter 'userid' is set + if ('userid' not in params or + params['userid'] is None): + raise ValueError("Missing the required parameter `userid` when calling `grant_label_studio_user_access`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'userid' in params: + path_params['userid'] = params['userid'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/annotations/access/users/{userid}', 'PUT', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_label_studio_team_access(self, owner, repo, **kwargs): # noqa: E501 + """List team access entries for annotation projects # noqa: E501 + + Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_label_studio_team_access(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: list[LabelStudioProjectAccess] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_label_studio_team_access_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.list_label_studio_team_access_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def list_label_studio_team_access_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List team access entries for annotation projects # noqa: E501 + + Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_label_studio_team_access_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: list[LabelStudioProjectAccess] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'project_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_label_studio_team_access" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `list_label_studio_team_access`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `list_label_studio_team_access`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'project_id' in params: + query_params.append(('project_id', params['project_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/annotations/access/teams', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[LabelStudioProjectAccess]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def list_label_studio_user_access(self, owner, repo, **kwargs): # noqa: E501 + """List user access entries for annotation projects # noqa: E501 + + Get a list of users with access to Label Studio annotation projects in the repository # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_label_studio_user_access(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: list[LabelStudioProjectAccess] + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.list_label_studio_user_access_with_http_info(owner, repo, **kwargs) # noqa: E501 + else: + (data) = self.list_label_studio_user_access_with_http_info(owner, repo, **kwargs) # noqa: E501 + return data + + def list_label_studio_user_access_with_http_info(self, owner, repo, **kwargs): # noqa: E501 + """List user access entries for annotation projects # noqa: E501 + + Get a list of users with access to Label Studio annotation projects in the repository # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.list_label_studio_user_access_with_http_info(owner, repo, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: list[LabelStudioProjectAccess] + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'project_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method list_label_studio_user_access" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `list_label_studio_user_access`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `list_label_studio_user_access`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + + query_params = [] + if 'project_id' in params: + query_params.append(('project_id', params['project_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/annotations/access/users', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='list[LabelStudioProjectAccess]', # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def revoke_label_studio_team_access(self, owner, repo, teamid, **kwargs): # noqa: E501 + """Revoke team access to annotation projects # noqa: E501 + + Revoke a team's access to Label Studio annotation projects # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.revoke_label_studio_team_access(owner, repo, teamid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int teamid: Team ID (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.revoke_label_studio_team_access_with_http_info(owner, repo, teamid, **kwargs) # noqa: E501 + else: + (data) = self.revoke_label_studio_team_access_with_http_info(owner, repo, teamid, **kwargs) # noqa: E501 + return data + + def revoke_label_studio_team_access_with_http_info(self, owner, repo, teamid, **kwargs): # noqa: E501 + """Revoke team access to annotation projects # noqa: E501 + + Revoke a team's access to Label Studio annotation projects # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.revoke_label_studio_team_access_with_http_info(owner, repo, teamid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int teamid: Team ID (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'teamid', 'project_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method revoke_label_studio_team_access" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `revoke_label_studio_team_access`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `revoke_label_studio_team_access`") # noqa: E501 + # verify the required parameter 'teamid' is set + if ('teamid' not in params or + params['teamid'] is None): + raise ValueError("Missing the required parameter `teamid` when calling `revoke_label_studio_team_access`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'teamid' in params: + path_params['teamid'] = params['teamid'] # noqa: E501 + + query_params = [] + if 'project_id' in params: + query_params.append(('project_id', params['project_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/annotations/access/teams/{teamid}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) + + def revoke_label_studio_user_access(self, owner, repo, userid, **kwargs): # noqa: E501 + """Revoke user access to annotation projects # noqa: E501 + + Revoke a user's access to Label Studio annotation projects # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.revoke_label_studio_user_access(owner, repo, userid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int userid: User ID (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.revoke_label_studio_user_access_with_http_info(owner, repo, userid, **kwargs) # noqa: E501 + else: + (data) = self.revoke_label_studio_user_access_with_http_info(owner, repo, userid, **kwargs) # noqa: E501 + return data + + def revoke_label_studio_user_access_with_http_info(self, owner, repo, userid, **kwargs): # noqa: E501 + """Revoke user access to annotation projects # noqa: E501 + + Revoke a user's access to Label Studio annotation projects # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.revoke_label_studio_user_access_with_http_info(owner, repo, userid, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param str owner: owner of the repository (required) + :param str repo: name of the repository (required) + :param int userid: User ID (required) + :param int project_id: Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['owner', 'repo', 'userid', 'project_id'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method revoke_label_studio_user_access" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'owner' is set + if ('owner' not in params or + params['owner'] is None): + raise ValueError("Missing the required parameter `owner` when calling `revoke_label_studio_user_access`") # noqa: E501 + # verify the required parameter 'repo' is set + if ('repo' not in params or + params['repo'] is None): + raise ValueError("Missing the required parameter `repo` when calling `revoke_label_studio_user_access`") # noqa: E501 + # verify the required parameter 'userid' is set + if ('userid' not in params or + params['userid'] is None): + raise ValueError("Missing the required parameter `userid` when calling `revoke_label_studio_user_access`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'owner' in params: + path_params['owner'] = params['owner'] # noqa: E501 + if 'repo' in params: + path_params['repo'] = params['repo'] # noqa: E501 + if 'userid' in params: + path_params['userid'] = params['userid'] # noqa: E501 + + query_params = [] + if 'project_id' in params: + query_params.append(('project_id', params['project_id'])) # noqa: E501 + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # Authentication setting + auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 + + return self.api_client.call_api( + '/repos/{owner}/{repo}/annotations/access/users/{userid}', 'DELETE', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/branches_api.py b/Python/dagshub_api/api/branches_api.py index aceb09a..de1a916 100644 --- a/Python/dagshub_api/api/branches_api.py +++ b/Python/dagshub_api/api/branches_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/api/collaborators_api.py b/Python/dagshub_api/api/collaborators_api.py index 86fb00a..37988fd 100644 --- a/Python/dagshub_api/api/collaborators_api.py +++ b/Python/dagshub_api/api/collaborators_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/api/commits_api.py b/Python/dagshub_api/api/commits_api.py index f147575..325a298 100644 --- a/Python/dagshub_api/api/commits_api.py +++ b/Python/dagshub_api/api/commits_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/api/content_api.py b/Python/dagshub_api/api/content_api.py index 1462f5b..1611bfa 100644 --- a/Python/dagshub_api/api/content_api.py +++ b/Python/dagshub_api/api/content_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/api/experiments_api.py b/Python/dagshub_api/api/experiments_api.py index 66709e3..df23640 100644 --- a/Python/dagshub_api/api/experiments_api.py +++ b/Python/dagshub_api/api/experiments_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/api/issues_api.py b/Python/dagshub_api/api/issues_api.py index b99e16c..03ccd15 100644 --- a/Python/dagshub_api/api/issues_api.py +++ b/Python/dagshub_api/api/issues_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/api/organizations_api.py b/Python/dagshub_api/api/organizations_api.py new file mode 100644 index 0000000..54247a8 --- /dev/null +++ b/Python/dagshub_api/api/organizations_api.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import re # noqa: F401 + +# python 2 and python 3 compatibility library +import six + +from dagshub_api.api_client import ApiClient + + +class OrganizationsApi(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + Ref: https://github.com/swagger-api/swagger-codegen + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient() + self.api_client = api_client + + def create_org_team(self, body, orgname, **kwargs): # noqa: E501 + """Create an organization team # noqa: E501 + + Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_org_team(body, orgname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateAnnotatorTeam body: (required) + :param str orgname: A DagsHub organization name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('async_req'): + return self.create_org_team_with_http_info(body, orgname, **kwargs) # noqa: E501 + else: + (data) = self.create_org_team_with_http_info(body, orgname, **kwargs) # noqa: E501 + return data + + def create_org_team_with_http_info(self, body, orgname, **kwargs): # noqa: E501 + """Create an organization team # noqa: E501 + + Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + >>> thread = api.create_org_team_with_http_info(body, orgname, async_req=True) + >>> result = thread.get() + + :param async_req bool + :param CreateAnnotatorTeam body: (required) + :param str orgname: A DagsHub organization name (required) + :return: None + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['body', 'orgname'] # noqa: E501 + all_params.append('async_req') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in six.iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method create_org_team" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'body' is set + if ('body' not in params or + params['body'] is None): + raise ValueError("Missing the required parameter `body` when calling `create_org_team`") # noqa: E501 + # verify the required parameter 'orgname' is set + if ('orgname' not in params or + params['orgname'] is None): + raise ValueError("Missing the required parameter `orgname` when calling `create_org_team`") # noqa: E501 + + collection_formats = {} + + path_params = {} + if 'orgname' in params: + path_params['orgname'] = params['orgname'] # noqa: E501 + + query_params = [] + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'body' in params: + body_params = params['body'] + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 + ['application/json']) # noqa: E501 + + # Authentication setting + auth_settings = ['basicAuth', 'tokenAuth'] # noqa: E501 + + return self.api_client.call_api( + '/admin/orgs/{orgname}/teams', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type=None, # noqa: E501 + auth_settings=auth_settings, + async_req=params.get('async_req'), + _return_http_data_only=params.get('_return_http_data_only'), + _preload_content=params.get('_preload_content', True), + _request_timeout=params.get('_request_timeout'), + collection_formats=collection_formats) diff --git a/Python/dagshub_api/api/releases_api.py b/Python/dagshub_api/api/releases_api.py index 8b8dd20..3ce3a1b 100644 --- a/Python/dagshub_api/api/releases_api.py +++ b/Python/dagshub_api/api/releases_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/api/repository_api.py b/Python/dagshub_api/api/repository_api.py index 05ce112..f372b7d 100644 --- a/Python/dagshub_api/api/repository_api.py +++ b/Python/dagshub_api/api/repository_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/api/storage_integrations_api.py b/Python/dagshub_api/api/storage_integrations_api.py index 157e7d0..1191375 100644 --- a/Python/dagshub_api/api/storage_integrations_api.py +++ b/Python/dagshub_api/api/storage_integrations_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -48,7 +48,8 @@ def get_bucket_content(self, owner, repo, protocol, bucket, path, **kwargs): # :param str path: path of a folder in the repository (required) :param bool include_size: :param int limit: Maximum amount of items to return - :param str from_token: Token, from which to continue iteration + :param bool paging: Whether or not paging is enabled + :param str from_token: [Only if paging is enabled] token, from which to continue iteration :return: Files1 If the method is called asynchronously, returns the request thread. @@ -76,13 +77,14 @@ def get_bucket_content_with_http_info(self, owner, repo, protocol, bucket, path, :param str path: path of a folder in the repository (required) :param bool include_size: :param int limit: Maximum amount of items to return - :param str from_token: Token, from which to continue iteration + :param bool paging: Whether or not paging is enabled + :param str from_token: [Only if paging is enabled] token, from which to continue iteration :return: Files1 If the method is called asynchronously, returns the request thread. """ - all_params = ['owner', 'repo', 'protocol', 'bucket', 'path', 'include_size', 'limit', 'from_token'] # noqa: E501 + all_params = ['owner', 'repo', 'protocol', 'bucket', 'path', 'include_size', 'limit', 'paging', 'from_token'] # noqa: E501 all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -137,6 +139,8 @@ def get_bucket_content_with_http_info(self, owner, repo, protocol, bucket, path, query_params.append(('include_size', params['include_size'])) # noqa: E501 if 'limit' in params: query_params.append(('limit', params['limit'])) # noqa: E501 + if 'paging' in params: + query_params.append(('paging', params['paging'])) # noqa: E501 if 'from_token' in params: query_params.append(('from_token', params['from_token'])) # noqa: E501 diff --git a/Python/dagshub_api/api/user_api.py b/Python/dagshub_api/api/user_api.py index 0b70498..cc7934d 100644 --- a/Python/dagshub_api/api/user_api.py +++ b/Python/dagshub_api/api/user_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/api/webhooks_api.py b/Python/dagshub_api/api/webhooks_api.py index 409d108..bc26f0e 100644 --- a/Python/dagshub_api/api/webhooks_api.py +++ b/Python/dagshub_api/api/webhooks_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/api_client.py b/Python/dagshub_api/api_client.py index b429804..46dda18 100644 --- a/Python/dagshub_api/api_client.py +++ b/Python/dagshub_api/api_client.py @@ -4,7 +4,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/configuration.py b/Python/dagshub_api/configuration.py index f08e3cc..f508a39 100644 --- a/Python/dagshub_api/configuration.py +++ b/Python/dagshub_api/configuration.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -253,6 +253,6 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.2\n"\ + "Version of the API: 1.0.3\n"\ "SDK Package Version: 1.0.3".\ format(env=sys.platform, pyversion=sys.version) diff --git a/Python/dagshub_api/models/__init__.py b/Python/dagshub_api/models/__init__.py index fb309c4..59f18e8 100644 --- a/Python/dagshub_api/models/__init__.py +++ b/Python/dagshub_api/models/__init__.py @@ -6,7 +6,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -18,13 +18,16 @@ from dagshub_api.models.body import Body from dagshub_api.models.closed import Closed from dagshub_api.models.collaborators_collaborator_body import CollaboratorsCollaboratorBody +from dagshub_api.models.create_annotator_team import CreateAnnotatorTeam from dagshub_api.models.create_repo import CreateRepo from dagshub_api.models.edit_experiment_post import EditExperimentPost from dagshub_api.models.experiment_keys import ExperimentKeys from dagshub_api.models.file import File from dagshub_api.models.files import Files from dagshub_api.models.files1 import Files1 +from dagshub_api.models.grant_label_studio_access import GrantLabelStudioAccess from dagshub_api.models.hooks_id_body import HooksIdBody +from dagshub_api.models.inline_response200 import InlineResponse200 from dagshub_api.models.integration import Integration from dagshub_api.models.integration_inner import IntegrationInner from dagshub_api.models.issue import Issue @@ -32,6 +35,7 @@ from dagshub_api.models.issue_labels import IssueLabels from dagshub_api.models.issue_milestone import IssueMilestone from dagshub_api.models.issues import Issues +from dagshub_api.models.label_studio_project_access import LabelStudioProjectAccess from dagshub_api.models.labels import Labels from dagshub_api.models.migrate_repo import MigrateRepo from dagshub_api.models.milestone import Milestone diff --git a/Python/dagshub_api/models/assignee.py b/Python/dagshub_api/models/assignee.py index 3f398de..6ad810b 100644 --- a/Python/dagshub_api/models/assignee.py +++ b/Python/dagshub_api/models/assignee.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/body.py b/Python/dagshub_api/models/body.py index 39ae097..72b0ca7 100644 --- a/Python/dagshub_api/models/body.py +++ b/Python/dagshub_api/models/body.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/closed.py b/Python/dagshub_api/models/closed.py index 8b63e0d..e01d884 100644 --- a/Python/dagshub_api/models/closed.py +++ b/Python/dagshub_api/models/closed.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/collaborators_collaborator_body.py b/Python/dagshub_api/models/collaborators_collaborator_body.py index 4e05054..818a6f6 100644 --- a/Python/dagshub_api/models/collaborators_collaborator_body.py +++ b/Python/dagshub_api/models/collaborators_collaborator_body.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/create_annotator_team.py b/Python/dagshub_api/models/create_annotator_team.py new file mode 100644 index 0000000..c87ee01 --- /dev/null +++ b/Python/dagshub_api/models/create_annotator_team.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class CreateAnnotatorTeam(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'description': 'str', + 'team_type': 'str', + 'permission': 'str' + } + + attribute_map = { + 'name': 'name', + 'description': 'description', + 'team_type': 'team_type', + 'permission': 'permission' + } + + def __init__(self, name=None, description=None, team_type='normal', permission=None): # noqa: E501 + """CreateAnnotatorTeam - a model defined in Swagger""" # noqa: E501 + self._name = None + self._description = None + self._team_type = None + self._permission = None + self.discriminator = None + self.name = name + if description is not None: + self.description = description + if team_type is not None: + self.team_type = team_type + if permission is not None: + self.permission = permission + + @property + def name(self): + """Gets the name of this CreateAnnotatorTeam. # noqa: E501 + + Team name # noqa: E501 + + :return: The name of this CreateAnnotatorTeam. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this CreateAnnotatorTeam. + + Team name # noqa: E501 + + :param name: The name of this CreateAnnotatorTeam. # noqa: E501 + :type: str + """ + if name is None: + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 + + self._name = name + + @property + def description(self): + """Gets the description of this CreateAnnotatorTeam. # noqa: E501 + + Team description # noqa: E501 + + :return: The description of this CreateAnnotatorTeam. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this CreateAnnotatorTeam. + + Team description # noqa: E501 + + :param description: The description of this CreateAnnotatorTeam. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def team_type(self): + """Gets the team_type of this CreateAnnotatorTeam. # noqa: E501 + + Type of team - normal teams have repository access, annotator teams only have annotation project access # noqa: E501 + + :return: The team_type of this CreateAnnotatorTeam. # noqa: E501 + :rtype: str + """ + return self._team_type + + @team_type.setter + def team_type(self, team_type): + """Sets the team_type of this CreateAnnotatorTeam. + + Type of team - normal teams have repository access, annotator teams only have annotation project access # noqa: E501 + + :param team_type: The team_type of this CreateAnnotatorTeam. # noqa: E501 + :type: str + """ + allowed_values = ["normal", "annotator"] # noqa: E501 + if team_type not in allowed_values: + raise ValueError( + "Invalid value for `team_type` ({0}), must be one of {1}" # noqa: E501 + .format(team_type, allowed_values) + ) + + self._team_type = team_type + + @property + def permission(self): + """Gets the permission of this CreateAnnotatorTeam. # noqa: E501 + + Repository permission level (required for normal teams, ignored for annotator teams) # noqa: E501 + + :return: The permission of this CreateAnnotatorTeam. # noqa: E501 + :rtype: str + """ + return self._permission + + @permission.setter + def permission(self, permission): + """Sets the permission of this CreateAnnotatorTeam. + + Repository permission level (required for normal teams, ignored for annotator teams) # noqa: E501 + + :param permission: The permission of this CreateAnnotatorTeam. # noqa: E501 + :type: str + """ + allowed_values = ["read", "write", "admin"] # noqa: E501 + if permission not in allowed_values: + raise ValueError( + "Invalid value for `permission` ({0}), must be one of {1}" # noqa: E501 + .format(permission, allowed_values) + ) + + self._permission = permission + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(CreateAnnotatorTeam, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, CreateAnnotatorTeam): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/Python/dagshub_api/models/create_repo.py b/Python/dagshub_api/models/create_repo.py index 79b2d5b..7cc0d05 100644 --- a/Python/dagshub_api/models/create_repo.py +++ b/Python/dagshub_api/models/create_repo.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/edit_experiment_post.py b/Python/dagshub_api/models/edit_experiment_post.py index a05b21b..6442794 100644 --- a/Python/dagshub_api/models/edit_experiment_post.py +++ b/Python/dagshub_api/models/edit_experiment_post.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/experiment_keys.py b/Python/dagshub_api/models/experiment_keys.py index 7c5f5e5..da10333 100644 --- a/Python/dagshub_api/models/experiment_keys.py +++ b/Python/dagshub_api/models/experiment_keys.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/file.py b/Python/dagshub_api/models/file.py index b164fdf..7affe94 100644 --- a/Python/dagshub_api/models/file.py +++ b/Python/dagshub_api/models/file.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/files.py b/Python/dagshub_api/models/files.py index 654a9e5..42ecd23 100644 --- a/Python/dagshub_api/models/files.py +++ b/Python/dagshub_api/models/files.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/files1.py b/Python/dagshub_api/models/files1.py index c972ece..31a88f2 100644 --- a/Python/dagshub_api/models/files1.py +++ b/Python/dagshub_api/models/files1.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -29,26 +29,21 @@ class Files1(object): """ swagger_types = { 'entries': 'list[File]', - 'limit': 'int', 'next_token': 'str' } attribute_map = { 'entries': 'entries', - 'limit': 'limit', 'next_token': 'next_token' } - def __init__(self, entries=None, limit=None, next_token=None): # noqa: E501 + def __init__(self, entries=None, next_token=None): # noqa: E501 """Files1 - a model defined in Swagger""" # noqa: E501 self._entries = None - self._limit = None self._next_token = None self.discriminator = None if entries is not None: self.entries = entries - if limit is not None: - self.limit = limit if next_token is not None: self.next_token = next_token @@ -73,31 +68,11 @@ def entries(self, entries): self._entries = entries - @property - def limit(self): - """Gets the limit of this Files1. # noqa: E501 - - - :return: The limit of this Files1. # noqa: E501 - :rtype: int - """ - return self._limit - - @limit.setter - def limit(self, limit): - """Sets the limit of this Files1. - - - :param limit: The limit of this Files1. # noqa: E501 - :type: int - """ - - self._limit = limit - @property def next_token(self): """Gets the next_token of this Files1. # noqa: E501 + Next token to continue pagination from # noqa: E501 :return: The next_token of this Files1. # noqa: E501 :rtype: str @@ -108,6 +83,7 @@ def next_token(self): def next_token(self, next_token): """Sets the next_token of this Files1. + Next token to continue pagination from # noqa: E501 :param next_token: The next_token of this Files1. # noqa: E501 :type: str diff --git a/Python/dagshub_api/models/grant_label_studio_access.py b/Python/dagshub_api/models/grant_label_studio_access.py new file mode 100644 index 0000000..6a3b329 --- /dev/null +++ b/Python/dagshub_api/models/grant_label_studio_access.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class GrantLabelStudioAccess(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'project_id': 'int', + 'access_level': 'str' + } + + attribute_map = { + 'project_id': 'project_id', + 'access_level': 'access_level' + } + + def __init__(self, project_id=None, access_level='annotator'): # noqa: E501 + """GrantLabelStudioAccess - a model defined in Swagger""" # noqa: E501 + self._project_id = None + self._access_level = None + self.discriminator = None + self.project_id = project_id + if access_level is not None: + self.access_level = access_level + + @property + def project_id(self): + """Gets the project_id of this GrantLabelStudioAccess. # noqa: E501 + + Project ID, -1 for wildcard access to all projects # noqa: E501 + + :return: The project_id of this GrantLabelStudioAccess. # noqa: E501 + :rtype: int + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this GrantLabelStudioAccess. + + Project ID, -1 for wildcard access to all projects # noqa: E501 + + :param project_id: The project_id of this GrantLabelStudioAccess. # noqa: E501 + :type: int + """ + if project_id is None: + raise ValueError("Invalid value for `project_id`, must not be `None`") # noqa: E501 + + self._project_id = project_id + + @property + def access_level(self): + """Gets the access_level of this GrantLabelStudioAccess. # noqa: E501 + + Access level to grant # noqa: E501 + + :return: The access_level of this GrantLabelStudioAccess. # noqa: E501 + :rtype: str + """ + return self._access_level + + @access_level.setter + def access_level(self, access_level): + """Sets the access_level of this GrantLabelStudioAccess. + + Access level to grant # noqa: E501 + + :param access_level: The access_level of this GrantLabelStudioAccess. # noqa: E501 + :type: str + """ + allowed_values = ["annotator", "none"] # noqa: E501 + if access_level not in allowed_values: + raise ValueError( + "Invalid value for `access_level` ({0}), must be one of {1}" # noqa: E501 + .format(access_level, allowed_values) + ) + + self._access_level = access_level + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(GrantLabelStudioAccess, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, GrantLabelStudioAccess): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/Python/dagshub_api/models/hooks_id_body.py b/Python/dagshub_api/models/hooks_id_body.py index bbab0f4..6cc915d 100644 --- a/Python/dagshub_api/models/hooks_id_body.py +++ b/Python/dagshub_api/models/hooks_id_body.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/inline_response200.py b/Python/dagshub_api/models/inline_response200.py new file mode 100644 index 0000000..838987b --- /dev/null +++ b/Python/dagshub_api/models/inline_response200.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class InlineResponse200(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'user_id': 'int', + 'project_id': 'int', + 'access_level': 'str' + } + + attribute_map = { + 'user_id': 'user_id', + 'project_id': 'project_id', + 'access_level': 'access_level' + } + + def __init__(self, user_id=None, project_id=None, access_level=None): # noqa: E501 + """InlineResponse200 - a model defined in Swagger""" # noqa: E501 + self._user_id = None + self._project_id = None + self._access_level = None + self.discriminator = None + if user_id is not None: + self.user_id = user_id + if project_id is not None: + self.project_id = project_id + if access_level is not None: + self.access_level = access_level + + @property + def user_id(self): + """Gets the user_id of this InlineResponse200. # noqa: E501 + + + :return: The user_id of this InlineResponse200. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this InlineResponse200. + + + :param user_id: The user_id of this InlineResponse200. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def project_id(self): + """Gets the project_id of this InlineResponse200. # noqa: E501 + + + :return: The project_id of this InlineResponse200. # noqa: E501 + :rtype: int + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this InlineResponse200. + + + :param project_id: The project_id of this InlineResponse200. # noqa: E501 + :type: int + """ + + self._project_id = project_id + + @property + def access_level(self): + """Gets the access_level of this InlineResponse200. # noqa: E501 + + + :return: The access_level of this InlineResponse200. # noqa: E501 + :rtype: str + """ + return self._access_level + + @access_level.setter + def access_level(self, access_level): + """Sets the access_level of this InlineResponse200. + + + :param access_level: The access_level of this InlineResponse200. # noqa: E501 + :type: str + """ + allowed_values = ["none", "annotator"] # noqa: E501 + if access_level not in allowed_values: + raise ValueError( + "Invalid value for `access_level` ({0}), must be one of {1}" # noqa: E501 + .format(access_level, allowed_values) + ) + + self._access_level = access_level + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(InlineResponse200, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, InlineResponse200): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/Python/dagshub_api/models/integration.py b/Python/dagshub_api/models/integration.py index 154b0a3..98e6bfe 100644 --- a/Python/dagshub_api/models/integration.py +++ b/Python/dagshub_api/models/integration.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/integration_inner.py b/Python/dagshub_api/models/integration_inner.py index 399aba8..8ff24d4 100644 --- a/Python/dagshub_api/models/integration_inner.py +++ b/Python/dagshub_api/models/integration_inner.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/issue.py b/Python/dagshub_api/models/issue.py index 7774fff..d2f19e4 100644 --- a/Python/dagshub_api/models/issue.py +++ b/Python/dagshub_api/models/issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/issue_assignee.py b/Python/dagshub_api/models/issue_assignee.py index 3727f89..f8044c4 100644 --- a/Python/dagshub_api/models/issue_assignee.py +++ b/Python/dagshub_api/models/issue_assignee.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/issue_labels.py b/Python/dagshub_api/models/issue_labels.py index 5a93253..2d56c94 100644 --- a/Python/dagshub_api/models/issue_labels.py +++ b/Python/dagshub_api/models/issue_labels.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/issue_milestone.py b/Python/dagshub_api/models/issue_milestone.py index 32a2770..b6752d0 100644 --- a/Python/dagshub_api/models/issue_milestone.py +++ b/Python/dagshub_api/models/issue_milestone.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/issues.py b/Python/dagshub_api/models/issues.py index 157a4c3..f0d93c3 100644 --- a/Python/dagshub_api/models/issues.py +++ b/Python/dagshub_api/models/issues.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/label_studio_project_access.py b/Python/dagshub_api/models/label_studio_project_access.py new file mode 100644 index 0000000..b6d7cff --- /dev/null +++ b/Python/dagshub_api/models/label_studio_project_access.py @@ -0,0 +1,304 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +import pprint +import re # noqa: F401 + +import six + +class LabelStudioProjectAccess(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'id': 'int', + 'repo_id': 'int', + 'project_id': 'int', + 'user_id': 'int', + 'team_id': 'int', + 'access_level': 'str', + 'created_unix': 'int', + 'user': 'User' + } + + attribute_map = { + 'id': 'id', + 'repo_id': 'repo_id', + 'project_id': 'project_id', + 'user_id': 'user_id', + 'team_id': 'team_id', + 'access_level': 'access_level', + 'created_unix': 'created_unix', + 'user': 'user' + } + + def __init__(self, id=None, repo_id=None, project_id=None, user_id=None, team_id=None, access_level=None, created_unix=None, user=None): # noqa: E501 + """LabelStudioProjectAccess - a model defined in Swagger""" # noqa: E501 + self._id = None + self._repo_id = None + self._project_id = None + self._user_id = None + self._team_id = None + self._access_level = None + self._created_unix = None + self._user = None + self.discriminator = None + if id is not None: + self.id = id + if repo_id is not None: + self.repo_id = repo_id + if project_id is not None: + self.project_id = project_id + if user_id is not None: + self.user_id = user_id + if team_id is not None: + self.team_id = team_id + if access_level is not None: + self.access_level = access_level + if created_unix is not None: + self.created_unix = created_unix + if user is not None: + self.user = user + + @property + def id(self): + """Gets the id of this LabelStudioProjectAccess. # noqa: E501 + + + :return: The id of this LabelStudioProjectAccess. # noqa: E501 + :rtype: int + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this LabelStudioProjectAccess. + + + :param id: The id of this LabelStudioProjectAccess. # noqa: E501 + :type: int + """ + + self._id = id + + @property + def repo_id(self): + """Gets the repo_id of this LabelStudioProjectAccess. # noqa: E501 + + + :return: The repo_id of this LabelStudioProjectAccess. # noqa: E501 + :rtype: int + """ + return self._repo_id + + @repo_id.setter + def repo_id(self, repo_id): + """Sets the repo_id of this LabelStudioProjectAccess. + + + :param repo_id: The repo_id of this LabelStudioProjectAccess. # noqa: E501 + :type: int + """ + + self._repo_id = repo_id + + @property + def project_id(self): + """Gets the project_id of this LabelStudioProjectAccess. # noqa: E501 + + Project ID, -1 means wildcard access to all projects # noqa: E501 + + :return: The project_id of this LabelStudioProjectAccess. # noqa: E501 + :rtype: int + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """Sets the project_id of this LabelStudioProjectAccess. + + Project ID, -1 means wildcard access to all projects # noqa: E501 + + :param project_id: The project_id of this LabelStudioProjectAccess. # noqa: E501 + :type: int + """ + + self._project_id = project_id + + @property + def user_id(self): + """Gets the user_id of this LabelStudioProjectAccess. # noqa: E501 + + User ID (present for user access entries) # noqa: E501 + + :return: The user_id of this LabelStudioProjectAccess. # noqa: E501 + :rtype: int + """ + return self._user_id + + @user_id.setter + def user_id(self, user_id): + """Sets the user_id of this LabelStudioProjectAccess. + + User ID (present for user access entries) # noqa: E501 + + :param user_id: The user_id of this LabelStudioProjectAccess. # noqa: E501 + :type: int + """ + + self._user_id = user_id + + @property + def team_id(self): + """Gets the team_id of this LabelStudioProjectAccess. # noqa: E501 + + Team ID (present for team access entries) # noqa: E501 + + :return: The team_id of this LabelStudioProjectAccess. # noqa: E501 + :rtype: int + """ + return self._team_id + + @team_id.setter + def team_id(self, team_id): + """Sets the team_id of this LabelStudioProjectAccess. + + Team ID (present for team access entries) # noqa: E501 + + :param team_id: The team_id of this LabelStudioProjectAccess. # noqa: E501 + :type: int + """ + + self._team_id = team_id + + @property + def access_level(self): + """Gets the access_level of this LabelStudioProjectAccess. # noqa: E501 + + + :return: The access_level of this LabelStudioProjectAccess. # noqa: E501 + :rtype: str + """ + return self._access_level + + @access_level.setter + def access_level(self, access_level): + """Sets the access_level of this LabelStudioProjectAccess. + + + :param access_level: The access_level of this LabelStudioProjectAccess. # noqa: E501 + :type: str + """ + allowed_values = ["none", "annotator"] # noqa: E501 + if access_level not in allowed_values: + raise ValueError( + "Invalid value for `access_level` ({0}), must be one of {1}" # noqa: E501 + .format(access_level, allowed_values) + ) + + self._access_level = access_level + + @property + def created_unix(self): + """Gets the created_unix of this LabelStudioProjectAccess. # noqa: E501 + + + :return: The created_unix of this LabelStudioProjectAccess. # noqa: E501 + :rtype: int + """ + return self._created_unix + + @created_unix.setter + def created_unix(self, created_unix): + """Sets the created_unix of this LabelStudioProjectAccess. + + + :param created_unix: The created_unix of this LabelStudioProjectAccess. # noqa: E501 + :type: int + """ + + self._created_unix = created_unix + + @property + def user(self): + """Gets the user of this LabelStudioProjectAccess. # noqa: E501 + + + :return: The user of this LabelStudioProjectAccess. # noqa: E501 + :rtype: User + """ + return self._user + + @user.setter + def user(self, user): + """Sets the user of this LabelStudioProjectAccess. + + + :param user: The user of this LabelStudioProjectAccess. # noqa: E501 + :type: User + """ + + self._user = user + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(LabelStudioProjectAccess, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, LabelStudioProjectAccess): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/Python/dagshub_api/models/labels.py b/Python/dagshub_api/models/labels.py index 9b15a0b..091d701 100644 --- a/Python/dagshub_api/models/labels.py +++ b/Python/dagshub_api/models/labels.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/migrate_repo.py b/Python/dagshub_api/models/migrate_repo.py index 0d87d9b..aa3ff1d 100644 --- a/Python/dagshub_api/models/migrate_repo.py +++ b/Python/dagshub_api/models/migrate_repo.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/milestone.py b/Python/dagshub_api/models/milestone.py index 77691eb..15bb2fe 100644 --- a/Python/dagshub_api/models/milestone.py +++ b/Python/dagshub_api/models/milestone.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/patch_issue.py b/Python/dagshub_api/models/patch_issue.py index cdb6456..0272e9c 100644 --- a/Python/dagshub_api/models/patch_issue.py +++ b/Python/dagshub_api/models/patch_issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/post_issue.py b/Python/dagshub_api/models/post_issue.py index f19293d..fdcef6b 100644 --- a/Python/dagshub_api/models/post_issue.py +++ b/Python/dagshub_api/models/post_issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/put_file.py b/Python/dagshub_api/models/put_file.py index e822482..ae6c76b 100644 --- a/Python/dagshub_api/models/put_file.py +++ b/Python/dagshub_api/models/put_file.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/repo_hooks_body.py b/Python/dagshub_api/models/repo_hooks_body.py index 39a70ec..97211ed 100644 --- a/Python/dagshub_api/models/repo_hooks_body.py +++ b/Python/dagshub_api/models/repo_hooks_body.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/state.py b/Python/dagshub_api/models/state.py index 27b63e7..529a599 100644 --- a/Python/dagshub_api/models/state.py +++ b/Python/dagshub_api/models/state.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/title.py b/Python/dagshub_api/models/title.py index 980ab35..2e0f935 100644 --- a/Python/dagshub_api/models/title.py +++ b/Python/dagshub_api/models/title.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/user.py b/Python/dagshub_api/models/user.py index b8ae00d..6bdb01f 100644 --- a/Python/dagshub_api/models/user.py +++ b/Python/dagshub_api/models/user.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/webhook_config.py b/Python/dagshub_api/models/webhook_config.py index 0606ec9..52fddcc 100644 --- a/Python/dagshub_api/models/webhook_config.py +++ b/Python/dagshub_api/models/webhook_config.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/models/webhook_events.py b/Python/dagshub_api/models/webhook_events.py index c567b8f..b9290ee 100644 --- a/Python/dagshub_api/models/webhook_events.py +++ b/Python/dagshub_api/models/webhook_events.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/dagshub_api/rest.py b/Python/dagshub_api/rest.py index ae8b019..3dcea1e 100644 --- a/Python/dagshub_api/rest.py +++ b/Python/dagshub_api/rest.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/docs/AnnotationsApi.md b/Python/docs/AnnotationsApi.md new file mode 100644 index 0000000..a503e00 --- /dev/null +++ b/Python/docs/AnnotationsApi.md @@ -0,0 +1,511 @@ +# dagshub_api.AnnotationsApi + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_label_studio_team_access**](AnnotationsApi.md#get_label_studio_team_access) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +[**get_label_studio_user_access**](AnnotationsApi.md#get_label_studio_user_access) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +[**grant_label_studio_team_access**](AnnotationsApi.md#grant_label_studio_team_access) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +[**grant_label_studio_user_access**](AnnotationsApi.md#grant_label_studio_user_access) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +[**list_label_studio_team_access**](AnnotationsApi.md#list_label_studio_team_access) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +[**list_label_studio_user_access**](AnnotationsApi.md#list_label_studio_user_access) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +[**revoke_label_studio_team_access**](AnnotationsApi.md#revoke_label_studio_team_access) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +[**revoke_label_studio_user_access**](AnnotationsApi.md#revoke_label_studio_user_access) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects + +# **get_label_studio_team_access** +> LabelStudioProjectAccess get_label_studio_team_access(owner, repo, teamid, project_id=project_id) + +Get team access level for annotation projects + +Get the access level for a specific team and project (or all projects) + +### Example +```python +from __future__ import print_function +import time +import dagshub_api +from dagshub_api.rest import ApiException +from pprint import pprint +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +teamid = 789 # int | Team ID +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + +try: + # Get team access level for annotation projects + api_response = api_instance.get_label_studio_team_access(owner, repo, teamid, project_id=project_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AnnotationsApi->get_label_studio_team_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **teamid** | **int**| Team ID | + **project_id** | **int**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**LabelStudioProjectAccess**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_label_studio_user_access** +> InlineResponse200 get_label_studio_user_access(owner, repo, userid, project_id=project_id) + +Get user access level for annotation projects + +Get the access level for a specific user and project (or all projects) + +### Example +```python +from __future__ import print_function +import time +import dagshub_api +from dagshub_api.rest import ApiException +from pprint import pprint +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +userid = 789 # int | User ID +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + +try: + # Get user access level for annotation projects + api_response = api_instance.get_label_studio_user_access(owner, repo, userid, project_id=project_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AnnotationsApi->get_label_studio_user_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **userid** | **int**| User ID | + **project_id** | **int**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **grant_label_studio_team_access** +> grant_label_studio_team_access(body, owner, repo, teamid) + +Grant team access to annotation projects + +Grant a team access to specific Label Studio annotation projects (organization repositories only) + +### Example +```python +from __future__ import print_function +import time +import dagshub_api +from dagshub_api.rest import ApiException +from pprint import pprint +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +body = dagshub_api.GrantLabelStudioAccess() # GrantLabelStudioAccess | +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +teamid = 789 # int | Team ID + +try: + # Grant team access to annotation projects + api_instance.grant_label_studio_team_access(body, owner, repo, teamid) +except ApiException as e: + print("Exception when calling AnnotationsApi->grant_label_studio_team_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **teamid** | **int**| Team ID | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **grant_label_studio_user_access** +> grant_label_studio_user_access(body, owner, repo, userid) + +Grant user access to annotation projects + +Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + +### Example +```python +from __future__ import print_function +import time +import dagshub_api +from dagshub_api.rest import ApiException +from pprint import pprint +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +body = dagshub_api.GrantLabelStudioAccess() # GrantLabelStudioAccess | +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +userid = 789 # int | User ID + +try: + # Grant user access to annotation projects + api_instance.grant_label_studio_user_access(body, owner, repo, userid) +except ApiException as e: + print("Exception when calling AnnotationsApi->grant_label_studio_user_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**GrantLabelStudioAccess**](GrantLabelStudioAccess.md)| | + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **userid** | **int**| User ID | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_label_studio_team_access** +> list[LabelStudioProjectAccess] list_label_studio_team_access(owner, repo, project_id=project_id) + +List team access entries for annotation projects + +Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + +### Example +```python +from __future__ import print_function +import time +import dagshub_api +from dagshub_api.rest import ApiException +from pprint import pprint +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + +try: + # List team access entries for annotation projects + api_response = api_instance.list_label_studio_team_access(owner, repo, project_id=project_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AnnotationsApi->list_label_studio_team_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **project_id** | **int**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**list[LabelStudioProjectAccess]**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **list_label_studio_user_access** +> list[LabelStudioProjectAccess] list_label_studio_user_access(owner, repo, project_id=project_id) + +List user access entries for annotation projects + +Get a list of users with access to Label Studio annotation projects in the repository + +### Example +```python +from __future__ import print_function +import time +import dagshub_api +from dagshub_api.rest import ApiException +from pprint import pprint +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + +try: + # List user access entries for annotation projects + api_response = api_instance.list_label_studio_user_access(owner, repo, project_id=project_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling AnnotationsApi->list_label_studio_user_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **project_id** | **int**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +[**list[LabelStudioProjectAccess]**](LabelStudioProjectAccess.md) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **revoke_label_studio_team_access** +> revoke_label_studio_team_access(owner, repo, teamid, project_id=project_id) + +Revoke team access to annotation projects + +Revoke a team's access to Label Studio annotation projects + +### Example +```python +from __future__ import print_function +import time +import dagshub_api +from dagshub_api.rest import ApiException +from pprint import pprint +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +teamid = 789 # int | Team ID +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + +try: + # Revoke team access to annotation projects + api_instance.revoke_label_studio_team_access(owner, repo, teamid, project_id=project_id) +except ApiException as e: + print("Exception when calling AnnotationsApi->revoke_label_studio_team_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **teamid** | **int**| Team ID | + **project_id** | **int**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **revoke_label_studio_user_access** +> revoke_label_studio_user_access(owner, repo, userid, project_id=project_id) + +Revoke user access to annotation projects + +Revoke a user's access to Label Studio annotation projects + +### Example +```python +from __future__ import print_function +import time +import dagshub_api +from dagshub_api.rest import ApiException +from pprint import pprint +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.AnnotationsApi(dagshub_api.ApiClient(configuration)) +owner = 'owner_example' # str | owner of the repository +repo = 'repo_example' # str | name of the repository +userid = 789 # int | User ID +project_id = 789 # int | Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + +try: + # Revoke user access to annotation projects + api_instance.revoke_label_studio_user_access(owner, repo, userid, project_id=project_id) +except ApiException as e: + print("Exception when calling AnnotationsApi->revoke_label_studio_user_access: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **str**| owner of the repository | + **repo** | **str**| name of the repository | + **userid** | **int**| User ID | + **project_id** | **int**| Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. | [optional] + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/Python/docs/CreateAnnotatorTeam.md b/Python/docs/CreateAnnotatorTeam.md new file mode 100644 index 0000000..8c6b9de --- /dev/null +++ b/Python/docs/CreateAnnotatorTeam.md @@ -0,0 +1,12 @@ +# CreateAnnotatorTeam + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Team name | +**description** | **str** | Team description | [optional] +**team_type** | **str** | Type of team - normal teams have repository access, annotator teams only have annotation project access | [optional] [default to 'normal'] +**permission** | **str** | Repository permission level (required for normal teams, ignored for annotator teams) | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/Python/docs/Files1.md b/Python/docs/Files1.md index 3b4f6be..fa1adb6 100644 --- a/Python/docs/Files1.md +++ b/Python/docs/Files1.md @@ -4,8 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **entries** | [**list[File]**](File.md) | | [optional] -**limit** | **int** | | [optional] -**next_token** | **str** | | [optional] +**next_token** | **str** | Next token to continue pagination from | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/Python/docs/GrantLabelStudioAccess.md b/Python/docs/GrantLabelStudioAccess.md new file mode 100644 index 0000000..f051621 --- /dev/null +++ b/Python/docs/GrantLabelStudioAccess.md @@ -0,0 +1,10 @@ +# GrantLabelStudioAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**project_id** | **int** | Project ID, -1 for wildcard access to all projects | +**access_level** | **str** | Access level to grant | [optional] [default to 'annotator'] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/Python/docs/InlineResponse200.md b/Python/docs/InlineResponse200.md new file mode 100644 index 0000000..4fc5f07 --- /dev/null +++ b/Python/docs/InlineResponse200.md @@ -0,0 +1,11 @@ +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**user_id** | **int** | | [optional] +**project_id** | **int** | | [optional] +**access_level** | **str** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/Python/docs/LabelStudioProjectAccess.md b/Python/docs/LabelStudioProjectAccess.md new file mode 100644 index 0000000..c8e2897 --- /dev/null +++ b/Python/docs/LabelStudioProjectAccess.md @@ -0,0 +1,16 @@ +# LabelStudioProjectAccess + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] +**repo_id** | **int** | | [optional] +**project_id** | **int** | Project ID, -1 means wildcard access to all projects | [optional] +**user_id** | **int** | User ID (present for user access entries) | [optional] +**team_id** | **int** | Team ID (present for team access entries) | [optional] +**access_level** | **str** | | [optional] +**created_unix** | **int** | | [optional] +**user** | [**User**](User.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/Python/docs/OrganizationsApi.md b/Python/docs/OrganizationsApi.md new file mode 100644 index 0000000..19a9938 --- /dev/null +++ b/Python/docs/OrganizationsApi.md @@ -0,0 +1,66 @@ +# dagshub_api.OrganizationsApi + +All URIs are relative to *https://dagshub.com/api/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_org_team**](OrganizationsApi.md#create_org_team) | **POST** /admin/orgs/{orgname}/teams | Create an organization team + +# **create_org_team** +> create_org_team(body, orgname) + +Create an organization team + +Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + +### Example +```python +from __future__ import print_function +import time +import dagshub_api +from dagshub_api.rest import ApiException +from pprint import pprint +# Configure HTTP basic authorization: basicAuth +configuration = dagshub_api.Configuration() +configuration.username = 'YOUR_USERNAME' +configuration.password = 'YOUR_PASSWORD' +# Configure API key authorization: tokenAuth +configuration = dagshub_api.Configuration() +configuration.api_key['token'] = 'YOUR_API_KEY' +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['token'] = 'Bearer' + +# create an instance of the API class +api_instance = dagshub_api.OrganizationsApi(dagshub_api.ApiClient(configuration)) +body = dagshub_api.CreateAnnotatorTeam() # CreateAnnotatorTeam | +orgname = 'orgname_example' # str | A DagsHub organization name + +try: + # Create an organization team + api_instance.create_org_team(body, orgname) +except ApiException as e: + print("Exception when calling OrganizationsApi->create_org_team: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateAnnotatorTeam**](CreateAnnotatorTeam.md)| | + **orgname** | **str**| A DagsHub organization name | + +### Return type + +void (empty response body) + +### Authorization + +[basicAuth](../README.md#basicAuth), [tokenAuth](../README.md#tokenAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/Python/docs/StorageIntegrationsApi.md b/Python/docs/StorageIntegrationsApi.md index acb7929..962a21e 100644 --- a/Python/docs/StorageIntegrationsApi.md +++ b/Python/docs/StorageIntegrationsApi.md @@ -9,7 +9,7 @@ Method | HTTP request | Description [**get_buckets**](StorageIntegrationsApi.md#get_buckets) | **GET** /repos/{owner}/{repo}/storage | List integrated storages in the repository # **get_bucket_content** -> Files1 get_bucket_content(owner, repo, protocol, bucket, path, include_size=include_size, limit=limit, from_token=from_token) +> Files1 get_bucket_content(owner, repo, protocol, bucket, path, include_size=include_size, limit=limit, paging=paging, from_token=from_token) List contents in the path @@ -39,11 +39,12 @@ bucket = 'bucket_example' # str | name and prefix of the bucket integration path = 'path_example' # str | path of a folder in the repository include_size = false # bool | (optional) (default to false) limit = 100 # int | Maximum amount of items to return (optional) (default to 100) -from_token = 'from_token_example' # str | Token, from which to continue iteration (optional) +paging = false # bool | Whether or not paging is enabled (optional) (default to false) +from_token = 'from_token_example' # str | [Only if paging is enabled] token, from which to continue iteration (optional) try: # List contents in the path - api_response = api_instance.get_bucket_content(owner, repo, protocol, bucket, path, include_size=include_size, limit=limit, from_token=from_token) + api_response = api_instance.get_bucket_content(owner, repo, protocol, bucket, path, include_size=include_size, limit=limit, paging=paging, from_token=from_token) pprint(api_response) except ApiException as e: print("Exception when calling StorageIntegrationsApi->get_bucket_content: %s\n" % e) @@ -60,7 +61,8 @@ Name | Type | Description | Notes **path** | **str**| path of a folder in the repository | **include_size** | **bool**| | [optional] [default to false] **limit** | **int**| Maximum amount of items to return | [optional] [default to 100] - **from_token** | **str**| Token, from which to continue iteration | [optional] + **paging** | **bool**| Whether or not paging is enabled | [optional] [default to false] + **from_token** | **str**| [Only if paging is enabled] token, from which to continue iteration | [optional] ### Return type diff --git a/Python/setup.py b/Python/setup.py index bd26efb..13552dc 100644 --- a/Python/setup.py +++ b/Python/setup.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_annotations_api.py b/Python/test/test_annotations_api.py new file mode 100644 index 0000000..1d89494 --- /dev/null +++ b/Python/test/test_annotations_api.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import dagshub_api +from dagshub_api.api.annotations_api import AnnotationsApi # noqa: E501 +from dagshub_api.rest import ApiException + + +class TestAnnotationsApi(unittest.TestCase): + """AnnotationsApi unit test stubs""" + + def setUp(self): + self.api = AnnotationsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_get_label_studio_team_access(self): + """Test case for get_label_studio_team_access + + Get team access level for annotation projects # noqa: E501 + """ + pass + + def test_get_label_studio_user_access(self): + """Test case for get_label_studio_user_access + + Get user access level for annotation projects # noqa: E501 + """ + pass + + def test_grant_label_studio_team_access(self): + """Test case for grant_label_studio_team_access + + Grant team access to annotation projects # noqa: E501 + """ + pass + + def test_grant_label_studio_user_access(self): + """Test case for grant_label_studio_user_access + + Grant user access to annotation projects # noqa: E501 + """ + pass + + def test_list_label_studio_team_access(self): + """Test case for list_label_studio_team_access + + List team access entries for annotation projects # noqa: E501 + """ + pass + + def test_list_label_studio_user_access(self): + """Test case for list_label_studio_user_access + + List user access entries for annotation projects # noqa: E501 + """ + pass + + def test_revoke_label_studio_team_access(self): + """Test case for revoke_label_studio_team_access + + Revoke team access to annotation projects # noqa: E501 + """ + pass + + def test_revoke_label_studio_user_access(self): + """Test case for revoke_label_studio_user_access + + Revoke user access to annotation projects # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/Python/test/test_assignee.py b/Python/test/test_assignee.py index 38832aa..56ba259 100644 --- a/Python/test/test_assignee.py +++ b/Python/test/test_assignee.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_body.py b/Python/test/test_body.py index dbff7d8..19fc2b9 100644 --- a/Python/test/test_body.py +++ b/Python/test/test_body.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_branches_api.py b/Python/test/test_branches_api.py index beb96bb..8897d34 100644 --- a/Python/test/test_branches_api.py +++ b/Python/test/test_branches_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_closed.py b/Python/test/test_closed.py index 1f6c25b..0fb7ee9 100644 --- a/Python/test/test_closed.py +++ b/Python/test/test_closed.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_collaborators_api.py b/Python/test/test_collaborators_api.py index 755ca42..d8522f1 100644 --- a/Python/test/test_collaborators_api.py +++ b/Python/test/test_collaborators_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_collaborators_collaborator_body.py b/Python/test/test_collaborators_collaborator_body.py index 090db14..75722b8 100644 --- a/Python/test/test_collaborators_collaborator_body.py +++ b/Python/test/test_collaborators_collaborator_body.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_commits_api.py b/Python/test/test_commits_api.py index b8c5afd..843a116 100644 --- a/Python/test/test_commits_api.py +++ b/Python/test/test_commits_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_content_api.py b/Python/test/test_content_api.py index 64c8bb7..4aa3f66 100644 --- a/Python/test/test_content_api.py +++ b/Python/test/test_content_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_create_annotator_team.py b/Python/test/test_create_annotator_team.py new file mode 100644 index 0000000..e432417 --- /dev/null +++ b/Python/test/test_create_annotator_team.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import dagshub_api +from dagshub_api.models.create_annotator_team import CreateAnnotatorTeam # noqa: E501 +from dagshub_api.rest import ApiException + + +class TestCreateAnnotatorTeam(unittest.TestCase): + """CreateAnnotatorTeam unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testCreateAnnotatorTeam(self): + """Test CreateAnnotatorTeam""" + # FIXME: construct object with mandatory attributes with example values + # model = dagshub_api.models.create_annotator_team.CreateAnnotatorTeam() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/Python/test/test_create_repo.py b/Python/test/test_create_repo.py index 01854a8..3c5a404 100644 --- a/Python/test/test_create_repo.py +++ b/Python/test/test_create_repo.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_edit_experiment_post.py b/Python/test/test_edit_experiment_post.py index 4363512..87c15c2 100644 --- a/Python/test/test_edit_experiment_post.py +++ b/Python/test/test_edit_experiment_post.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_experiment_keys.py b/Python/test/test_experiment_keys.py index 30436ed..9c7e455 100644 --- a/Python/test/test_experiment_keys.py +++ b/Python/test/test_experiment_keys.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_experiments_api.py b/Python/test/test_experiments_api.py index 140a779..b597a9e 100644 --- a/Python/test/test_experiments_api.py +++ b/Python/test/test_experiments_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_file.py b/Python/test/test_file.py index 8499bdc..db88aac 100644 --- a/Python/test/test_file.py +++ b/Python/test/test_file.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_files.py b/Python/test/test_files.py index 8c38b35..8de7860 100644 --- a/Python/test/test_files.py +++ b/Python/test/test_files.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_files1.py b/Python/test/test_files1.py index bd8a699..387a92a 100644 --- a/Python/test/test_files1.py +++ b/Python/test/test_files1.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_grant_label_studio_access.py b/Python/test/test_grant_label_studio_access.py new file mode 100644 index 0000000..3cb187c --- /dev/null +++ b/Python/test/test_grant_label_studio_access.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import dagshub_api +from dagshub_api.models.grant_label_studio_access import GrantLabelStudioAccess # noqa: E501 +from dagshub_api.rest import ApiException + + +class TestGrantLabelStudioAccess(unittest.TestCase): + """GrantLabelStudioAccess unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGrantLabelStudioAccess(self): + """Test GrantLabelStudioAccess""" + # FIXME: construct object with mandatory attributes with example values + # model = dagshub_api.models.grant_label_studio_access.GrantLabelStudioAccess() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/Python/test/test_hooks_id_body.py b/Python/test/test_hooks_id_body.py index d152731..43af47d 100644 --- a/Python/test/test_hooks_id_body.py +++ b/Python/test/test_hooks_id_body.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_inline_response200.py b/Python/test/test_inline_response200.py new file mode 100644 index 0000000..3dfda0f --- /dev/null +++ b/Python/test/test_inline_response200.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import dagshub_api +from dagshub_api.models.inline_response200 import InlineResponse200 # noqa: E501 +from dagshub_api.rest import ApiException + + +class TestInlineResponse200(unittest.TestCase): + """InlineResponse200 unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testInlineResponse200(self): + """Test InlineResponse200""" + # FIXME: construct object with mandatory attributes with example values + # model = dagshub_api.models.inline_response200.InlineResponse200() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/Python/test/test_integration.py b/Python/test/test_integration.py index 6a73c5f..649516e 100644 --- a/Python/test/test_integration.py +++ b/Python/test/test_integration.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_integration_inner.py b/Python/test/test_integration_inner.py index 73c8eea..3ad29be 100644 --- a/Python/test/test_integration_inner.py +++ b/Python/test/test_integration_inner.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_issue.py b/Python/test/test_issue.py index b151e23..26362f0 100644 --- a/Python/test/test_issue.py +++ b/Python/test/test_issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_issue_assignee.py b/Python/test/test_issue_assignee.py index 49d430b..de38233 100644 --- a/Python/test/test_issue_assignee.py +++ b/Python/test/test_issue_assignee.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_issue_labels.py b/Python/test/test_issue_labels.py index c75f483..b9cb8ee 100644 --- a/Python/test/test_issue_labels.py +++ b/Python/test/test_issue_labels.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_issue_milestone.py b/Python/test/test_issue_milestone.py index 80a4f6a..99a68f1 100644 --- a/Python/test/test_issue_milestone.py +++ b/Python/test/test_issue_milestone.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_issues.py b/Python/test/test_issues.py index 7f42c3f..40e8bff 100644 --- a/Python/test/test_issues.py +++ b/Python/test/test_issues.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_issues_api.py b/Python/test/test_issues_api.py index 74207fe..83f1ebf 100644 --- a/Python/test/test_issues_api.py +++ b/Python/test/test_issues_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_label_studio_project_access.py b/Python/test/test_label_studio_project_access.py new file mode 100644 index 0000000..99c2b7d --- /dev/null +++ b/Python/test/test_label_studio_project_access.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import dagshub_api +from dagshub_api.models.label_studio_project_access import LabelStudioProjectAccess # noqa: E501 +from dagshub_api.rest import ApiException + + +class TestLabelStudioProjectAccess(unittest.TestCase): + """LabelStudioProjectAccess unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testLabelStudioProjectAccess(self): + """Test LabelStudioProjectAccess""" + # FIXME: construct object with mandatory attributes with example values + # model = dagshub_api.models.label_studio_project_access.LabelStudioProjectAccess() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/Python/test/test_labels.py b/Python/test/test_labels.py index 76750fd..da72fc1 100644 --- a/Python/test/test_labels.py +++ b/Python/test/test_labels.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_migrate_repo.py b/Python/test/test_migrate_repo.py index 4c194d1..4bbb8cb 100644 --- a/Python/test/test_migrate_repo.py +++ b/Python/test/test_migrate_repo.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_milestone.py b/Python/test/test_milestone.py index eb673e7..30a3e84 100644 --- a/Python/test/test_milestone.py +++ b/Python/test/test_milestone.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_organizations_api.py b/Python/test/test_organizations_api.py new file mode 100644 index 0000000..1efb05f --- /dev/null +++ b/Python/test/test_organizations_api.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + DagsHub API + + This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 + + OpenAPI spec version: 1.0.3 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import unittest + +import dagshub_api +from dagshub_api.api.organizations_api import OrganizationsApi # noqa: E501 +from dagshub_api.rest import ApiException + + +class TestOrganizationsApi(unittest.TestCase): + """OrganizationsApi unit test stubs""" + + def setUp(self): + self.api = OrganizationsApi() # noqa: E501 + + def tearDown(self): + pass + + def test_create_org_team(self): + """Test case for create_org_team + + Create an organization team # noqa: E501 + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/Python/test/test_patch_issue.py b/Python/test/test_patch_issue.py index 6c008f9..9b35c35 100644 --- a/Python/test/test_patch_issue.py +++ b/Python/test/test_patch_issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_post_issue.py b/Python/test/test_post_issue.py index 0b8d624..94001be 100644 --- a/Python/test/test_post_issue.py +++ b/Python/test/test_post_issue.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_put_file.py b/Python/test/test_put_file.py index 17c2474..b922cd2 100644 --- a/Python/test/test_put_file.py +++ b/Python/test/test_put_file.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_releases_api.py b/Python/test/test_releases_api.py index 8bff563..0c8e924 100644 --- a/Python/test/test_releases_api.py +++ b/Python/test/test_releases_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_repo_hooks_body.py b/Python/test/test_repo_hooks_body.py index fcdc650..abb0d31 100644 --- a/Python/test/test_repo_hooks_body.py +++ b/Python/test/test_repo_hooks_body.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_repository_api.py b/Python/test/test_repository_api.py index 091b287..8cb3dd2 100644 --- a/Python/test/test_repository_api.py +++ b/Python/test/test_repository_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_state.py b/Python/test/test_state.py index cbb3621..8e7634f 100644 --- a/Python/test/test_state.py +++ b/Python/test/test_state.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_storage_integrations_api.py b/Python/test/test_storage_integrations_api.py index 6be88ae..b4b16b6 100644 --- a/Python/test/test_storage_integrations_api.py +++ b/Python/test/test_storage_integrations_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_title.py b/Python/test/test_title.py index 1937ebf..24c0451 100644 --- a/Python/test/test_title.py +++ b/Python/test/test_title.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_user.py b/Python/test/test_user.py index c2689bb..5c44abf 100644 --- a/Python/test/test_user.py +++ b/Python/test/test_user.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_user_api.py b/Python/test/test_user_api.py index 3696195..067902d 100644 --- a/Python/test/test_user_api.py +++ b/Python/test/test_user_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_webhook_config.py b/Python/test/test_webhook_config.py index bbe0948..515a1d7 100644 --- a/Python/test/test_webhook_config.py +++ b/Python/test/test_webhook_config.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_webhook_events.py b/Python/test/test_webhook_events.py index 8fe2260..d13ca96 100644 --- a/Python/test/test_webhook_events.py +++ b/Python/test/test_webhook_events.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/Python/test/test_webhooks_api.py b/Python/test/test_webhooks_api.py index e71ce1c..e16d07f 100644 --- a/Python/test/test_webhooks_api.py +++ b/Python/test/test_webhooks_api.py @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # noqa: E501 - OpenAPI spec version: 1.0.2 + OpenAPI spec version: 1.0.3 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/R/NAMESPACE b/R/NAMESPACE index f8b1808..6b10014 100644 --- a/R/NAMESPACE +++ b/R/NAMESPACE @@ -5,12 +5,15 @@ export(Assignee) export(Body) export(Closed) export(CollaboratorsCollaboratorBody) +export(CreateAnnotatorTeam) export(CreateRepo) export(EditExperimentPost) export(ExperimentKeys) export(Files) export(Files1) +export(GrantLabelStudioAccess) export(HooksIdBody) +export(InlineResponse200) export(Integration) export(IntegrationInner) export(Issue) @@ -18,6 +21,7 @@ export(IssueAssignee) export(IssueLabels) export(IssueMilestone) export(Issues) +export(LabelStudioProjectAccess) export(Labels) export(MigrateRepo) export(Milestone) diff --git a/R/R/AnnotationsApi.r b/R/R/AnnotationsApi.r new file mode 100644 index 0000000..a0a629a --- /dev/null +++ b/R/R/AnnotationsApi.r @@ -0,0 +1,368 @@ +# DagsHub API +# +# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. +# +# OpenAPI spec version: 1.0.3 +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +#' @title Annotations operations +#' @description dagshub_api.Annotations +#' +#' @field path Stores url path of the request. +#' @field apiClient Handles the client-server communication. +#' @field userAgent Set the user agent of the request. +#' +#' @importFrom R6 R6Class +#' +#' @section Methods: +#' \describe{ +#' +#' get_label_studio_team_access Get team access level for annotation projects +#' +#' +#' get_label_studio_user_access Get user access level for annotation projects +#' +#' +#' grant_label_studio_team_access Grant team access to annotation projects +#' +#' +#' grant_label_studio_user_access Grant user access to annotation projects +#' +#' +#' list_label_studio_team_access List team access entries for annotation projects +#' +#' +#' list_label_studio_user_access List user access entries for annotation projects +#' +#' +#' revoke_label_studio_team_access Revoke team access to annotation projects +#' +#' +#' revoke_label_studio_user_access Revoke user access to annotation projects +#' +#' } +#' +#' @export +AnnotationsApi <- R6::R6Class( + 'AnnotationsApi', + public = list( + userAgent = "Swagger-Codegen/1.0.3/r", + apiClient = NULL, + initialize = function(apiClient){ + if (!missing(apiClient)) { + self$apiClient <- apiClient + } + else { + self$apiClient <- ApiClient$new() + } + }, + get_label_studio_team_access = function(owner, repo, teamid, project_id, ...){ + args <- list(...) + queryParams <- list() + headerParams <- character() + + if (!missing(`project_id`)) { + queryParams['project_id'] <- project_id + } + + urlPath <- "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + if (!missing(`owner`)) { + urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) + } + + if (!missing(`repo`)) { + urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) + } + + if (!missing(`teamid`)) { + urlPath <- gsub(paste0("\\{", "teamid", "\\}"), `teamid`, urlPath) + } + + resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), + method = "GET", + queryParams = queryParams, + headerParams = headerParams, + body = body, + ...) + + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + returnObject <- LabelStudioProjectAccess$new() + result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) + Response$new(returnObject, resp) + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + Response$new("API client error", resp) + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + Response$new("API server error", resp) + } + + } + get_label_studio_user_access = function(owner, repo, userid, project_id, ...){ + args <- list(...) + queryParams <- list() + headerParams <- character() + + if (!missing(`project_id`)) { + queryParams['project_id'] <- project_id + } + + urlPath <- "/repos/{owner}/{repo}/annotations/access/users/{userid}" + if (!missing(`owner`)) { + urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) + } + + if (!missing(`repo`)) { + urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) + } + + if (!missing(`userid`)) { + urlPath <- gsub(paste0("\\{", "userid", "\\}"), `userid`, urlPath) + } + + resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), + method = "GET", + queryParams = queryParams, + headerParams = headerParams, + body = body, + ...) + + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + returnObject <- InlineResponse200$new() + result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) + Response$new(returnObject, resp) + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + Response$new("API client error", resp) + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + Response$new("API server error", resp) + } + + } + grant_label_studio_team_access = function(body, owner, repo, teamid, ...){ + args <- list(...) + queryParams <- list() + headerParams <- character() + + if (!missing(`body`)) { + body <- `body`$toJSONString() + } else { + body <- NULL + } + + urlPath <- "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + if (!missing(`owner`)) { + urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) + } + + if (!missing(`repo`)) { + urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) + } + + if (!missing(`teamid`)) { + urlPath <- gsub(paste0("\\{", "teamid", "\\}"), `teamid`, urlPath) + } + + resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), + method = "PUT", + queryParams = queryParams, + headerParams = headerParams, + body = body, + ...) + + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + # void response, no need to return anything + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + Response$new("API client error", resp) + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + Response$new("API server error", resp) + } + + } + grant_label_studio_user_access = function(body, owner, repo, userid, ...){ + args <- list(...) + queryParams <- list() + headerParams <- character() + + if (!missing(`body`)) { + body <- `body`$toJSONString() + } else { + body <- NULL + } + + urlPath <- "/repos/{owner}/{repo}/annotations/access/users/{userid}" + if (!missing(`owner`)) { + urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) + } + + if (!missing(`repo`)) { + urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) + } + + if (!missing(`userid`)) { + urlPath <- gsub(paste0("\\{", "userid", "\\}"), `userid`, urlPath) + } + + resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), + method = "PUT", + queryParams = queryParams, + headerParams = headerParams, + body = body, + ...) + + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + # void response, no need to return anything + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + Response$new("API client error", resp) + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + Response$new("API server error", resp) + } + + } + list_label_studio_team_access = function(owner, repo, project_id, ...){ + args <- list(...) + queryParams <- list() + headerParams <- character() + + if (!missing(`project_id`)) { + queryParams['project_id'] <- project_id + } + + urlPath <- "/repos/{owner}/{repo}/annotations/access/teams" + if (!missing(`owner`)) { + urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) + } + + if (!missing(`repo`)) { + urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) + } + + resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), + method = "GET", + queryParams = queryParams, + headerParams = headerParams, + body = body, + ...) + + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + returnObject <- LabelStudioProjectAccess$new() + result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) + Response$new(returnObject, resp) + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + Response$new("API client error", resp) + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + Response$new("API server error", resp) + } + + } + list_label_studio_user_access = function(owner, repo, project_id, ...){ + args <- list(...) + queryParams <- list() + headerParams <- character() + + if (!missing(`project_id`)) { + queryParams['project_id'] <- project_id + } + + urlPath <- "/repos/{owner}/{repo}/annotations/access/users" + if (!missing(`owner`)) { + urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) + } + + if (!missing(`repo`)) { + urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) + } + + resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), + method = "GET", + queryParams = queryParams, + headerParams = headerParams, + body = body, + ...) + + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + returnObject <- LabelStudioProjectAccess$new() + result <- returnObject$fromJSON(httr::content(resp, "text", encoding = "UTF-8")) + Response$new(returnObject, resp) + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + Response$new("API client error", resp) + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + Response$new("API server error", resp) + } + + } + revoke_label_studio_team_access = function(owner, repo, teamid, project_id, ...){ + args <- list(...) + queryParams <- list() + headerParams <- character() + + if (!missing(`project_id`)) { + queryParams['project_id'] <- project_id + } + + urlPath <- "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + if (!missing(`owner`)) { + urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) + } + + if (!missing(`repo`)) { + urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) + } + + if (!missing(`teamid`)) { + urlPath <- gsub(paste0("\\{", "teamid", "\\}"), `teamid`, urlPath) + } + + resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), + method = "DELETE", + queryParams = queryParams, + headerParams = headerParams, + body = body, + ...) + + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + # void response, no need to return anything + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + Response$new("API client error", resp) + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + Response$new("API server error", resp) + } + + } + revoke_label_studio_user_access = function(owner, repo, userid, project_id, ...){ + args <- list(...) + queryParams <- list() + headerParams <- character() + + if (!missing(`project_id`)) { + queryParams['project_id'] <- project_id + } + + urlPath <- "/repos/{owner}/{repo}/annotations/access/users/{userid}" + if (!missing(`owner`)) { + urlPath <- gsub(paste0("\\{", "owner", "\\}"), `owner`, urlPath) + } + + if (!missing(`repo`)) { + urlPath <- gsub(paste0("\\{", "repo", "\\}"), `repo`, urlPath) + } + + if (!missing(`userid`)) { + urlPath <- gsub(paste0("\\{", "userid", "\\}"), `userid`, urlPath) + } + + resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), + method = "DELETE", + queryParams = queryParams, + headerParams = headerParams, + body = body, + ...) + + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + # void response, no need to return anything + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + Response$new("API client error", resp) + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + Response$new("API server error", resp) + } + + } + ) +) diff --git a/R/R/ApiClient.r b/R/R/ApiClient.r index b30965f..ada4863 100644 --- a/R/R/ApiClient.r +++ b/R/R/ApiClient.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/Assignee.r b/R/R/Assignee.r index ac5a308..57621bf 100644 --- a/R/R/Assignee.r +++ b/R/R/Assignee.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/Body.r b/R/R/Body.r index e7fa702..8083304 100644 --- a/R/R/Body.r +++ b/R/R/Body.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/BranchesApi.r b/R/R/BranchesApi.r index 5f2bfe0..7b62914 100644 --- a/R/R/BranchesApi.r +++ b/R/R/BranchesApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title Branches operations diff --git a/R/R/Closed.r b/R/R/Closed.r index 35c3ead..b1e8b5c 100644 --- a/R/R/Closed.r +++ b/R/R/Closed.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/CollaboratorsApi.r b/R/R/CollaboratorsApi.r index 0b27cc3..80396b8 100644 --- a/R/R/CollaboratorsApi.r +++ b/R/R/CollaboratorsApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title Collaborators operations diff --git a/R/R/CollaboratorsCollaboratorBody.r b/R/R/CollaboratorsCollaboratorBody.r index ce2b5d3..7a50afb 100644 --- a/R/R/CollaboratorsCollaboratorBody.r +++ b/R/R/CollaboratorsCollaboratorBody.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/CommitsApi.r b/R/R/CommitsApi.r index d51ebdc..5e43246 100644 --- a/R/R/CommitsApi.r +++ b/R/R/CommitsApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title Commits operations diff --git a/R/R/ContentApi.r b/R/R/ContentApi.r index 019909f..c6b83a3 100644 --- a/R/R/ContentApi.r +++ b/R/R/ContentApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title Content operations diff --git a/R/R/CreateAnnotatorTeam.r b/R/R/CreateAnnotatorTeam.r new file mode 100644 index 0000000..c59028e --- /dev/null +++ b/R/R/CreateAnnotatorTeam.r @@ -0,0 +1,98 @@ +# DagsHub API +# +# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. +# +# OpenAPI spec version: 1.0.3 +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git + +#' CreateAnnotatorTeam Class +#' +#' @field name +#' @field description +#' @field team_type +#' @field permission +#' +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +CreateAnnotatorTeam <- R6::R6Class( + 'CreateAnnotatorTeam', + public = list( + `name` = NULL, + `description` = NULL, + `team_type` = NULL, + `permission` = NULL, + initialize = function(`name`, `description`, `team_type`, `permission`){ + if (!missing(`name`)) { + stopifnot(is.character(`name`), length(`name`) == 1) + self$`name` <- `name` + } + if (!missing(`description`)) { + stopifnot(is.character(`description`), length(`description`) == 1) + self$`description` <- `description` + } + if (!missing(`team_type`)) { + stopifnot(is.character(`team_type`), length(`team_type`) == 1) + self$`team_type` <- `team_type` + } + if (!missing(`permission`)) { + stopifnot(is.character(`permission`), length(`permission`) == 1) + self$`permission` <- `permission` + } + }, + toJSON = function() { + CreateAnnotatorTeamObject <- list() + if (!is.null(self$`name`)) { + CreateAnnotatorTeamObject[['name']] <- self$`name` + } + if (!is.null(self$`description`)) { + CreateAnnotatorTeamObject[['description']] <- self$`description` + } + if (!is.null(self$`team_type`)) { + CreateAnnotatorTeamObject[['team_type']] <- self$`team_type` + } + if (!is.null(self$`permission`)) { + CreateAnnotatorTeamObject[['permission']] <- self$`permission` + } + + CreateAnnotatorTeamObject + }, + fromJSON = function(CreateAnnotatorTeamJson) { + CreateAnnotatorTeamObject <- jsonlite::fromJSON(CreateAnnotatorTeamJson) + if (!is.null(CreateAnnotatorTeamObject$`name`)) { + self$`name` <- CreateAnnotatorTeamObject$`name` + } + if (!is.null(CreateAnnotatorTeamObject$`description`)) { + self$`description` <- CreateAnnotatorTeamObject$`description` + } + if (!is.null(CreateAnnotatorTeamObject$`team_type`)) { + self$`team_type` <- CreateAnnotatorTeamObject$`team_type` + } + if (!is.null(CreateAnnotatorTeamObject$`permission`)) { + self$`permission` <- CreateAnnotatorTeamObject$`permission` + } + }, + toJSONString = function() { + sprintf( + '{ + "name": %s, + "description": %s, + "team_type": %s, + "permission": %s + }', + self$`name`, + self$`description`, + self$`team_type`, + self$`permission` + ) + }, + fromJSONString = function(CreateAnnotatorTeamJson) { + CreateAnnotatorTeamObject <- jsonlite::fromJSON(CreateAnnotatorTeamJson) + self$`name` <- CreateAnnotatorTeamObject$`name` + self$`description` <- CreateAnnotatorTeamObject$`description` + self$`team_type` <- CreateAnnotatorTeamObject$`team_type` + self$`permission` <- CreateAnnotatorTeamObject$`permission` + } + ) +) diff --git a/R/R/CreateRepo.r b/R/R/CreateRepo.r index aa93365..e821c66 100644 --- a/R/R/CreateRepo.r +++ b/R/R/CreateRepo.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/EditExperimentPost.r b/R/R/EditExperimentPost.r index 93968e0..6a2f355 100644 --- a/R/R/EditExperimentPost.r +++ b/R/R/EditExperimentPost.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/ExperimentKeys.r b/R/R/ExperimentKeys.r index 3c9689b..ed982c0 100644 --- a/R/R/ExperimentKeys.r +++ b/R/R/ExperimentKeys.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/ExperimentsApi.r b/R/R/ExperimentsApi.r index ae50345..56271b3 100644 --- a/R/R/ExperimentsApi.r +++ b/R/R/ExperimentsApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title Experiments operations diff --git a/R/R/Files.r b/R/R/Files.r index b91d163..05b5af5 100644 --- a/R/R/Files.r +++ b/R/R/Files.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/Files1.r b/R/R/Files1.r index fd8c72e..86f3078 100644 --- a/R/R/Files1.r +++ b/R/R/Files1.r @@ -2,14 +2,13 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' Files1 Class #' #' @field entries -#' @field limit #' @field next_token #' #' @importFrom R6 R6Class @@ -19,18 +18,13 @@ Files1 <- R6::R6Class( 'Files1', public = list( `entries` = NULL, - `limit` = NULL, `next_token` = NULL, - initialize = function(`entries`, `limit`, `next_token`){ + initialize = function(`entries`, `next_token`){ if (!missing(`entries`)) { stopifnot(is.list(`entries`), length(`entries`) != 0) lapply(`entries`, function(x) stopifnot(R6::is.R6(x))) self$`entries` <- `entries` } - if (!missing(`limit`)) { - stopifnot(is.numeric(`limit`), length(`limit`) == 1) - self$`limit` <- `limit` - } if (!missing(`next_token`)) { stopifnot(is.character(`next_token`), length(`next_token`) == 1) self$`next_token` <- `next_token` @@ -41,9 +35,6 @@ Files1 <- R6::R6Class( if (!is.null(self$`entries`)) { Files1Object[['entries']] <- lapply(self$`entries`, function(x) x$toJSON()) } - if (!is.null(self$`limit`)) { - Files1Object[['limit']] <- self$`limit` - } if (!is.null(self$`next_token`)) { Files1Object[['next_token']] <- self$`next_token` } @@ -59,9 +50,6 @@ Files1 <- R6::R6Class( entriesObject }) } - if (!is.null(Files1Object$`limit`)) { - self$`limit` <- Files1Object$`limit` - } if (!is.null(Files1Object$`next_token`)) { self$`next_token` <- Files1Object$`next_token` } @@ -70,18 +58,15 @@ Files1 <- R6::R6Class( sprintf( '{ "entries": [%s], - "limit": %d, "next_token": %s }', lapply(self$`entries`, function(x) paste(x$toJSON(), sep=",")), - self$`limit`, self$`next_token` ) }, fromJSONString = function(Files1Json) { Files1Object <- jsonlite::fromJSON(Files1Json) self$`entries` <- lapply(Files1Object$`entries`, function(x) File$new()$fromJSON(jsonlite::toJSON(x, auto_unbox = TRUE))) - self$`limit` <- Files1Object$`limit` self$`next_token` <- Files1Object$`next_token` } ) diff --git a/R/R/GrantLabelStudioAccess.r b/R/R/GrantLabelStudioAccess.r new file mode 100644 index 0000000..d330d84 --- /dev/null +++ b/R/R/GrantLabelStudioAccess.r @@ -0,0 +1,68 @@ +# DagsHub API +# +# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. +# +# OpenAPI spec version: 1.0.3 +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git + +#' GrantLabelStudioAccess Class +#' +#' @field project_id +#' @field access_level +#' +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +GrantLabelStudioAccess <- R6::R6Class( + 'GrantLabelStudioAccess', + public = list( + `project_id` = NULL, + `access_level` = NULL, + initialize = function(`project_id`, `access_level`){ + if (!missing(`project_id`)) { + stopifnot(is.numeric(`project_id`), length(`project_id`) == 1) + self$`project_id` <- `project_id` + } + if (!missing(`access_level`)) { + stopifnot(is.character(`access_level`), length(`access_level`) == 1) + self$`access_level` <- `access_level` + } + }, + toJSON = function() { + GrantLabelStudioAccessObject <- list() + if (!is.null(self$`project_id`)) { + GrantLabelStudioAccessObject[['project_id']] <- self$`project_id` + } + if (!is.null(self$`access_level`)) { + GrantLabelStudioAccessObject[['access_level']] <- self$`access_level` + } + + GrantLabelStudioAccessObject + }, + fromJSON = function(GrantLabelStudioAccessJson) { + GrantLabelStudioAccessObject <- jsonlite::fromJSON(GrantLabelStudioAccessJson) + if (!is.null(GrantLabelStudioAccessObject$`project_id`)) { + self$`project_id` <- GrantLabelStudioAccessObject$`project_id` + } + if (!is.null(GrantLabelStudioAccessObject$`access_level`)) { + self$`access_level` <- GrantLabelStudioAccessObject$`access_level` + } + }, + toJSONString = function() { + sprintf( + '{ + "project_id": %d, + "access_level": %s + }', + self$`project_id`, + self$`access_level` + ) + }, + fromJSONString = function(GrantLabelStudioAccessJson) { + GrantLabelStudioAccessObject <- jsonlite::fromJSON(GrantLabelStudioAccessJson) + self$`project_id` <- GrantLabelStudioAccessObject$`project_id` + self$`access_level` <- GrantLabelStudioAccessObject$`access_level` + } + ) +) diff --git a/R/R/HooksIdBody.r b/R/R/HooksIdBody.r index a0b35fc..90d7625 100644 --- a/R/R/HooksIdBody.r +++ b/R/R/HooksIdBody.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/InlineResponse200.r b/R/R/InlineResponse200.r new file mode 100644 index 0000000..b994716 --- /dev/null +++ b/R/R/InlineResponse200.r @@ -0,0 +1,83 @@ +# DagsHub API +# +# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. +# +# OpenAPI spec version: 1.0.3 +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git + +#' InlineResponse200 Class +#' +#' @field user_id +#' @field project_id +#' @field access_level +#' +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +InlineResponse200 <- R6::R6Class( + 'InlineResponse200', + public = list( + `user_id` = NULL, + `project_id` = NULL, + `access_level` = NULL, + initialize = function(`user_id`, `project_id`, `access_level`){ + if (!missing(`user_id`)) { + stopifnot(is.numeric(`user_id`), length(`user_id`) == 1) + self$`user_id` <- `user_id` + } + if (!missing(`project_id`)) { + stopifnot(is.numeric(`project_id`), length(`project_id`) == 1) + self$`project_id` <- `project_id` + } + if (!missing(`access_level`)) { + stopifnot(is.character(`access_level`), length(`access_level`) == 1) + self$`access_level` <- `access_level` + } + }, + toJSON = function() { + InlineResponse200Object <- list() + if (!is.null(self$`user_id`)) { + InlineResponse200Object[['user_id']] <- self$`user_id` + } + if (!is.null(self$`project_id`)) { + InlineResponse200Object[['project_id']] <- self$`project_id` + } + if (!is.null(self$`access_level`)) { + InlineResponse200Object[['access_level']] <- self$`access_level` + } + + InlineResponse200Object + }, + fromJSON = function(InlineResponse200Json) { + InlineResponse200Object <- jsonlite::fromJSON(InlineResponse200Json) + if (!is.null(InlineResponse200Object$`user_id`)) { + self$`user_id` <- InlineResponse200Object$`user_id` + } + if (!is.null(InlineResponse200Object$`project_id`)) { + self$`project_id` <- InlineResponse200Object$`project_id` + } + if (!is.null(InlineResponse200Object$`access_level`)) { + self$`access_level` <- InlineResponse200Object$`access_level` + } + }, + toJSONString = function() { + sprintf( + '{ + "user_id": %d, + "project_id": %d, + "access_level": %s + }', + self$`user_id`, + self$`project_id`, + self$`access_level` + ) + }, + fromJSONString = function(InlineResponse200Json) { + InlineResponse200Object <- jsonlite::fromJSON(InlineResponse200Json) + self$`user_id` <- InlineResponse200Object$`user_id` + self$`project_id` <- InlineResponse200Object$`project_id` + self$`access_level` <- InlineResponse200Object$`access_level` + } + ) +) diff --git a/R/R/Integration.r b/R/R/Integration.r index e6fa59c..48c9d89 100644 --- a/R/R/Integration.r +++ b/R/R/Integration.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/IntegrationInner.r b/R/R/IntegrationInner.r index 3c2bba3..18e0454 100644 --- a/R/R/IntegrationInner.r +++ b/R/R/IntegrationInner.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/Issue.r b/R/R/Issue.r index 6a04aaf..395982a 100644 --- a/R/R/Issue.r +++ b/R/R/Issue.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/IssueAssignee.r b/R/R/IssueAssignee.r index 21b57ab..02c1bf5 100644 --- a/R/R/IssueAssignee.r +++ b/R/R/IssueAssignee.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/IssueLabels.r b/R/R/IssueLabels.r index e4563ba..fe28ec8 100644 --- a/R/R/IssueLabels.r +++ b/R/R/IssueLabels.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/IssueMilestone.r b/R/R/IssueMilestone.r index b9ac719..4f06c2e 100644 --- a/R/R/IssueMilestone.r +++ b/R/R/IssueMilestone.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/Issues.r b/R/R/Issues.r index bb3e1c2..979e989 100644 --- a/R/R/Issues.r +++ b/R/R/Issues.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/IssuesApi.r b/R/R/IssuesApi.r index 617c184..fbaf969 100644 --- a/R/R/IssuesApi.r +++ b/R/R/IssuesApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title Issues operations diff --git a/R/R/LabelStudioProjectAccess.r b/R/R/LabelStudioProjectAccess.r new file mode 100644 index 0000000..e0bb478 --- /dev/null +++ b/R/R/LabelStudioProjectAccess.r @@ -0,0 +1,161 @@ +# DagsHub API +# +# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. +# +# OpenAPI spec version: 1.0.3 +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git + +#' LabelStudioProjectAccess Class +#' +#' @field id +#' @field repo_id +#' @field project_id +#' @field user_id +#' @field team_id +#' @field access_level +#' @field created_unix +#' @field user +#' +#' @importFrom R6 R6Class +#' @importFrom jsonlite fromJSON toJSON +#' @export +LabelStudioProjectAccess <- R6::R6Class( + 'LabelStudioProjectAccess', + public = list( + `id` = NULL, + `repo_id` = NULL, + `project_id` = NULL, + `user_id` = NULL, + `team_id` = NULL, + `access_level` = NULL, + `created_unix` = NULL, + `user` = NULL, + initialize = function(`id`, `repo_id`, `project_id`, `user_id`, `team_id`, `access_level`, `created_unix`, `user`){ + if (!missing(`id`)) { + stopifnot(is.numeric(`id`), length(`id`) == 1) + self$`id` <- `id` + } + if (!missing(`repo_id`)) { + stopifnot(is.numeric(`repo_id`), length(`repo_id`) == 1) + self$`repo_id` <- `repo_id` + } + if (!missing(`project_id`)) { + stopifnot(is.numeric(`project_id`), length(`project_id`) == 1) + self$`project_id` <- `project_id` + } + if (!missing(`user_id`)) { + stopifnot(is.numeric(`user_id`), length(`user_id`) == 1) + self$`user_id` <- `user_id` + } + if (!missing(`team_id`)) { + stopifnot(is.numeric(`team_id`), length(`team_id`) == 1) + self$`team_id` <- `team_id` + } + if (!missing(`access_level`)) { + stopifnot(is.character(`access_level`), length(`access_level`) == 1) + self$`access_level` <- `access_level` + } + if (!missing(`created_unix`)) { + stopifnot(is.numeric(`created_unix`), length(`created_unix`) == 1) + self$`created_unix` <- `created_unix` + } + if (!missing(`user`)) { + stopifnot(R6::is.R6(`user`)) + self$`user` <- `user` + } + }, + toJSON = function() { + LabelStudioProjectAccessObject <- list() + if (!is.null(self$`id`)) { + LabelStudioProjectAccessObject[['id']] <- self$`id` + } + if (!is.null(self$`repo_id`)) { + LabelStudioProjectAccessObject[['repo_id']] <- self$`repo_id` + } + if (!is.null(self$`project_id`)) { + LabelStudioProjectAccessObject[['project_id']] <- self$`project_id` + } + if (!is.null(self$`user_id`)) { + LabelStudioProjectAccessObject[['user_id']] <- self$`user_id` + } + if (!is.null(self$`team_id`)) { + LabelStudioProjectAccessObject[['team_id']] <- self$`team_id` + } + if (!is.null(self$`access_level`)) { + LabelStudioProjectAccessObject[['access_level']] <- self$`access_level` + } + if (!is.null(self$`created_unix`)) { + LabelStudioProjectAccessObject[['created_unix']] <- self$`created_unix` + } + if (!is.null(self$`user`)) { + LabelStudioProjectAccessObject[['user']] <- self$`user`$toJSON() + } + + LabelStudioProjectAccessObject + }, + fromJSON = function(LabelStudioProjectAccessJson) { + LabelStudioProjectAccessObject <- jsonlite::fromJSON(LabelStudioProjectAccessJson) + if (!is.null(LabelStudioProjectAccessObject$`id`)) { + self$`id` <- LabelStudioProjectAccessObject$`id` + } + if (!is.null(LabelStudioProjectAccessObject$`repo_id`)) { + self$`repo_id` <- LabelStudioProjectAccessObject$`repo_id` + } + if (!is.null(LabelStudioProjectAccessObject$`project_id`)) { + self$`project_id` <- LabelStudioProjectAccessObject$`project_id` + } + if (!is.null(LabelStudioProjectAccessObject$`user_id`)) { + self$`user_id` <- LabelStudioProjectAccessObject$`user_id` + } + if (!is.null(LabelStudioProjectAccessObject$`team_id`)) { + self$`team_id` <- LabelStudioProjectAccessObject$`team_id` + } + if (!is.null(LabelStudioProjectAccessObject$`access_level`)) { + self$`access_level` <- LabelStudioProjectAccessObject$`access_level` + } + if (!is.null(LabelStudioProjectAccessObject$`created_unix`)) { + self$`created_unix` <- LabelStudioProjectAccessObject$`created_unix` + } + if (!is.null(LabelStudioProjectAccessObject$`user`)) { + userObject <- User$new() + userObject$fromJSON(jsonlite::toJSON(LabelStudioProjectAccessObject$user, auto_unbox = TRUE)) + self$`user` <- userObject + } + }, + toJSONString = function() { + sprintf( + '{ + "id": %d, + "repo_id": %d, + "project_id": %d, + "user_id": %d, + "team_id": %d, + "access_level": %s, + "created_unix": %d, + "user": %s + }', + self$`id`, + self$`repo_id`, + self$`project_id`, + self$`user_id`, + self$`team_id`, + self$`access_level`, + self$`created_unix`, + self$`user`$toJSON() + ) + }, + fromJSONString = function(LabelStudioProjectAccessJson) { + LabelStudioProjectAccessObject <- jsonlite::fromJSON(LabelStudioProjectAccessJson) + self$`id` <- LabelStudioProjectAccessObject$`id` + self$`repo_id` <- LabelStudioProjectAccessObject$`repo_id` + self$`project_id` <- LabelStudioProjectAccessObject$`project_id` + self$`user_id` <- LabelStudioProjectAccessObject$`user_id` + self$`team_id` <- LabelStudioProjectAccessObject$`team_id` + self$`access_level` <- LabelStudioProjectAccessObject$`access_level` + self$`created_unix` <- LabelStudioProjectAccessObject$`created_unix` + UserObject <- User$new() + self$`user` <- UserObject$fromJSON(jsonlite::toJSON(LabelStudioProjectAccessObject$user, auto_unbox = TRUE)) + } + ) +) diff --git a/R/R/Labels.r b/R/R/Labels.r index 45eb09b..9a96af0 100644 --- a/R/R/Labels.r +++ b/R/R/Labels.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/MigrateRepo.r b/R/R/MigrateRepo.r index 25908c5..bc5f295 100644 --- a/R/R/MigrateRepo.r +++ b/R/R/MigrateRepo.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/Milestone.r b/R/R/Milestone.r index 491e465..2089bfd 100644 --- a/R/R/Milestone.r +++ b/R/R/Milestone.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/OrganizationsApi.r b/R/R/OrganizationsApi.r new file mode 100644 index 0000000..654e5e4 --- /dev/null +++ b/R/R/OrganizationsApi.r @@ -0,0 +1,71 @@ +# DagsHub API +# +# This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. +# +# OpenAPI spec version: 1.0.3 +# +# Generated by: https://github.com/swagger-api/swagger-codegen.git +#' @title Organizations operations +#' @description dagshub_api.Organizations +#' +#' @field path Stores url path of the request. +#' @field apiClient Handles the client-server communication. +#' @field userAgent Set the user agent of the request. +#' +#' @importFrom R6 R6Class +#' +#' @section Methods: +#' \describe{ +#' +#' create_org_team Create an organization team +#' +#' } +#' +#' @export +OrganizationsApi <- R6::R6Class( + 'OrganizationsApi', + public = list( + userAgent = "Swagger-Codegen/1.0.3/r", + apiClient = NULL, + initialize = function(apiClient){ + if (!missing(apiClient)) { + self$apiClient <- apiClient + } + else { + self$apiClient <- ApiClient$new() + } + }, + create_org_team = function(body, orgname, ...){ + args <- list(...) + queryParams <- list() + headerParams <- character() + + if (!missing(`body`)) { + body <- `body`$toJSONString() + } else { + body <- NULL + } + + urlPath <- "/admin/orgs/{orgname}/teams" + if (!missing(`orgname`)) { + urlPath <- gsub(paste0("\\{", "orgname", "\\}"), `orgname`, urlPath) + } + + resp <- self$apiClient$callApi(url = paste0(self$apiClient$basePath, urlPath), + method = "POST", + queryParams = queryParams, + headerParams = headerParams, + body = body, + ...) + + if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { + # void response, no need to return anything + } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { + Response$new("API client error", resp) + } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { + Response$new("API server error", resp) + } + + } + ) +) diff --git a/R/R/PatchIssue.r b/R/R/PatchIssue.r index 62adab3..fa6298b 100644 --- a/R/R/PatchIssue.r +++ b/R/R/PatchIssue.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/PostIssue.r b/R/R/PostIssue.r index ee998d0..db143a1 100644 --- a/R/R/PostIssue.r +++ b/R/R/PostIssue.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/PutFile.r b/R/R/PutFile.r index 281bd14..0fd7446 100644 --- a/R/R/PutFile.r +++ b/R/R/PutFile.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/ReleasesApi.r b/R/R/ReleasesApi.r index 56f4ee9..0e6a834 100644 --- a/R/R/ReleasesApi.r +++ b/R/R/ReleasesApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title Releases operations diff --git a/R/R/RepoHooksBody.r b/R/R/RepoHooksBody.r index b4b1f9a..9203bc3 100644 --- a/R/R/RepoHooksBody.r +++ b/R/R/RepoHooksBody.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/RepositoryApi.r b/R/R/RepositoryApi.r index 8847cda..9c969a3 100644 --- a/R/R/RepositoryApi.r +++ b/R/R/RepositoryApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title Repository operations diff --git a/R/R/State.r b/R/R/State.r index 33f2ccf..08da7bd 100644 --- a/R/R/State.r +++ b/R/R/State.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/StorageIntegrationsApi.r b/R/R/StorageIntegrationsApi.r index b390116..5f51379 100644 --- a/R/R/StorageIntegrationsApi.r +++ b/R/R/StorageIntegrationsApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title StorageIntegrations operations @@ -41,7 +41,7 @@ StorageIntegrationsApi <- R6::R6Class( self$apiClient <- ApiClient$new() } }, - get_bucket_content = function(owner, repo, protocol, bucket, path, include_size, limit, from_token, ...){ + get_bucket_content = function(owner, repo, protocol, bucket, path, include_size, limit, paging, from_token, ...){ args <- list(...) queryParams <- list() headerParams <- character() @@ -54,6 +54,10 @@ StorageIntegrationsApi <- R6::R6Class( queryParams['limit'] <- limit } + if (!missing(`paging`)) { + queryParams['paging'] <- paging + } + if (!missing(`from_token`)) { queryParams['from_token'] <- from_token } diff --git a/R/R/Title.r b/R/R/Title.r index 9cef8ab..0f774a5 100644 --- a/R/R/Title.r +++ b/R/R/Title.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/User.r b/R/R/User.r index c0a4091..ac77632 100644 --- a/R/R/User.r +++ b/R/R/User.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/UserApi.r b/R/R/UserApi.r index bf0589e..d906e8c 100644 --- a/R/R/UserApi.r +++ b/R/R/UserApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title User operations diff --git a/R/R/WebhookConfig.r b/R/R/WebhookConfig.r index 321a9f1..3c8e468 100644 --- a/R/R/WebhookConfig.r +++ b/R/R/WebhookConfig.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/WebhookEvents.r b/R/R/WebhookEvents.r index 32d90f3..8c719bb 100644 --- a/R/R/WebhookEvents.r +++ b/R/R/WebhookEvents.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git diff --git a/R/R/WebhooksApi.r b/R/R/WebhooksApi.r index 7b0730e..cddcb63 100644 --- a/R/R/WebhooksApi.r +++ b/R/R/WebhooksApi.r @@ -2,7 +2,7 @@ # # This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. # -# OpenAPI spec version: 1.0.2 +# OpenAPI spec version: 1.0.3 # # Generated by: https://github.com/swagger-api/swagger-codegen.git #' @title Webhooks operations diff --git a/R/README.md b/R/README.md index 950264a..2a110e6 100644 --- a/R/README.md +++ b/R/README.md @@ -5,7 +5,7 @@ This API provides a way to retrive & interact with data about DagsHub repositori ## Overview This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [OpenAPI/Swagger spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. -- API version: 1.0.2 +- API version: 1.0.3 - Package version: 1.0.3 - Build package: io.swagger.codegen.v3.generators.r.RClientCodegen diff --git a/Scala/README.md b/Scala/README.md index ecc6938..b2261fb 100644 --- a/Scala/README.md +++ b/Scala/README.md @@ -8,7 +8,7 @@ This API provides a way to retrive & interact with data about DagsHub repositori Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: -- API version: 1.0.2 +- API version: 1.0.3 - Package version: - Build package: io.swagger.codegen.v3.generators.scala.ScalaClientCodegen @@ -65,6 +65,14 @@ All URIs are relative to *https://dagshub.com/api/v1* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AnnotationsApi* | [**getLabelStudioTeamAccess**](AnnotationsApi.md#getLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Get team access level for annotation projects +*AnnotationsApi* | [**getLabelStudioUserAccess**](AnnotationsApi.md#getLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users/{userid} | Get user access level for annotation projects +*AnnotationsApi* | [**grantLabelStudioTeamAccess**](AnnotationsApi.md#grantLabelStudioTeamAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Grant team access to annotation projects +*AnnotationsApi* | [**grantLabelStudioUserAccess**](AnnotationsApi.md#grantLabelStudioUserAccess) | **PUT** /repos/{owner}/{repo}/annotations/access/users/{userid} | Grant user access to annotation projects +*AnnotationsApi* | [**listLabelStudioTeamAccess**](AnnotationsApi.md#listLabelStudioTeamAccess) | **GET** /repos/{owner}/{repo}/annotations/access/teams | List team access entries for annotation projects +*AnnotationsApi* | [**listLabelStudioUserAccess**](AnnotationsApi.md#listLabelStudioUserAccess) | **GET** /repos/{owner}/{repo}/annotations/access/users | List user access entries for annotation projects +*AnnotationsApi* | [**revokeLabelStudioTeamAccess**](AnnotationsApi.md#revokeLabelStudioTeamAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/teams/{teamid} | Revoke team access to annotation projects +*AnnotationsApi* | [**revokeLabelStudioUserAccess**](AnnotationsApi.md#revokeLabelStudioUserAccess) | **DELETE** /repos/{owner}/{repo}/annotations/access/users/{userid} | Revoke user access to annotation projects *BranchesApi* | [**getBranch**](BranchesApi.md#getBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Get Branch *BranchesApi* | [**listBranches**](BranchesApi.md#listBranches) | **GET** /repos/{owner}/{repo}/branches | List Branches *CollaboratorsApi* | [**addCollaborator**](CollaboratorsApi.md#addCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add user as a collaborator @@ -85,6 +93,7 @@ Class | Method | HTTP request | Description *IssuesApi* | [**editIssue**](IssuesApi.md#editIssue) | **PATCH** /repos/{owner}/{repo}/issues | Edit an issue *IssuesApi* | [**getIssue**](IssuesApi.md#getIssue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get a single issue *IssuesApi* | [**listRepoIssues**](IssuesApi.md#listRepoIssues) | **GET** /repos/{owner}/{repo}/issues | List issues for a repository +*OrganizationsApi* | [**createOrgTeam**](OrganizationsApi.md#createOrgTeam) | **POST** /admin/orgs/{orgname}/teams | Create an organization team *ReleasesApi* | [**listReleases**](ReleasesApi.md#listReleases) | **GET** /repos/{owner}/{repo}/releases | List Releases *RepositoryApi* | [**createOrgRepo**](RepositoryApi.md#createOrgRepo) | **POST** /org/{orgname}/repos | Create in organization *RepositoryApi* | [**createRepo**](RepositoryApi.md#createRepo) | **POST** /user/repos | Create @@ -110,12 +119,15 @@ Class | Method | HTTP request | Description - [Body](Body.md) - [Closed](Closed.md) - [CollaboratorsCollaboratorBody](CollaboratorsCollaboratorBody.md) + - [CreateAnnotatorTeam](CreateAnnotatorTeam.md) - [CreateRepo](CreateRepo.md) - [EditExperimentPost](EditExperimentPost.md) - [ExperimentKeys](ExperimentKeys.md) - [Files](Files.md) - [Files1](Files1.md) + - [GrantLabelStudioAccess](GrantLabelStudioAccess.md) - [HooksIdBody](HooksIdBody.md) + - [InlineResponse200](InlineResponse200.md) - [Integration](Integration.md) - [IntegrationInner](IntegrationInner.md) - [Issue](Issue.md) @@ -123,6 +135,7 @@ Class | Method | HTTP request | Description - [IssueLabels](IssueLabels.md) - [IssueMilestone](IssueMilestone.md) - [Issues](Issues.md) + - [LabelStudioProjectAccess](LabelStudioProjectAccess.md) - [Labels](Labels.md) - [MigrateRepo](MigrateRepo.md) - [Milestone](Milestone.md) diff --git a/Scala/src/main/scala/io/swagger/client/ApiInvoker.scala b/Scala/src/main/scala/io/swagger/client/ApiInvoker.scala index 8d4c85f..b285ebc 100644 --- a/Scala/src/main/scala/io/swagger/client/ApiInvoker.scala +++ b/Scala/src/main/scala/io/swagger/client/ApiInvoker.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/api/AnnotationsApi.scala b/Scala/src/main/scala/io/swagger/client/api/AnnotationsApi.scala new file mode 100644 index 0000000..20a065f --- /dev/null +++ b/Scala/src/main/scala/io/swagger/client/api/AnnotationsApi.scala @@ -0,0 +1,568 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.api + +import java.text.SimpleDateFormat + +import io.swagger.client.model.GrantLabelStudioAccess +import io.swagger.client.model.LabelStudioProjectAccess +import io.swagger.client.model.inline_response_200 +import io.swagger.client.{ApiInvoker, ApiException} + +import com.sun.jersey.multipart.FormDataMultiPart +import com.sun.jersey.multipart.file.FileDataBodyPart + +import javax.ws.rs.core.MediaType + +import java.io.File +import java.util.Date +import java.util.TimeZone + +import scala.collection.mutable.HashMap + +import com.wordnik.swagger.client._ +import scala.concurrent.Future +import collection.mutable + +import java.net.URI + +import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ +import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ + +import scala.concurrent.ExecutionContext.Implicits.global +import scala.concurrent._ +import scala.concurrent.duration._ +import scala.util.{Failure, Success, Try} + +import org.json4s._ + +class AnnotationsApi( + val defBasePath: String = "https://dagshub.com/api/v1", + defApiInvoker: ApiInvoker = ApiInvoker +) { + private lazy val dateTimeFormatter = { + val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") + formatter.setTimeZone(TimeZone.getTimeZone("UTC")) + formatter + } + private val dateFormatter = { + val formatter = new SimpleDateFormat("yyyy-MM-dd") + formatter.setTimeZone(TimeZone.getTimeZone("UTC")) + formatter + } + implicit val formats = new org.json4s.DefaultFormats { + override def dateFormatter = dateTimeFormatter + } + implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader + implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader + implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader + implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader + implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter + implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter + + var basePath: String = defBasePath + var apiInvoker: ApiInvoker = defApiInvoker + + def addHeader(key: String, value: String): mutable.HashMap[String, String] = { + apiInvoker.defaultHeaders += key -> value + } + + val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) + val client = new RestClient(config) + val helper = new AnnotationsApiAsyncHelper(client, config) + + /** + * Get team access level for annotation projects + * Get the access level for a specific team and project (or all projects) + * + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return LabelStudioProjectAccess + */ + def getLabelStudioTeamAccess(owner: String, repo: String, teamid: Long, projectId: Option[Long] = None): Option[LabelStudioProjectAccess] = { + val await = Try(Await.result(getLabelStudioTeamAccessAsync(owner, repo, teamid, projectId), Duration.Inf)) + await match { + case Success(i) => Some(await.get) + case Failure(t) => None + } + } + + /** + * Get team access level for annotation projects asynchronously + * Get the access level for a specific team and project (or all projects) + * + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return Future(LabelStudioProjectAccess) + */ + def getLabelStudioTeamAccessAsync(owner: String, repo: String, teamid: Long, projectId: Option[Long] = None): Future[LabelStudioProjectAccess] = { + helper.getLabelStudioTeamAccess(owner, repo, teamid, projectId) + } + + /** + * Get user access level for annotation projects + * Get the access level for a specific user and project (or all projects) + * + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return inline_response_200 + */ + def getLabelStudioUserAccess(owner: String, repo: String, userid: Long, projectId: Option[Long] = None): Option[inline_response_200] = { + val await = Try(Await.result(getLabelStudioUserAccessAsync(owner, repo, userid, projectId), Duration.Inf)) + await match { + case Success(i) => Some(await.get) + case Failure(t) => None + } + } + + /** + * Get user access level for annotation projects asynchronously + * Get the access level for a specific user and project (or all projects) + * + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return Future(inline_response_200) + */ + def getLabelStudioUserAccessAsync(owner: String, repo: String, userid: Long, projectId: Option[Long] = None): Future[inline_response_200] = { + helper.getLabelStudioUserAccess(owner, repo, userid, projectId) + } + + /** + * Grant team access to annotation projects + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * + * @param body + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @return void + */ + def grantLabelStudioTeamAccess(body: GrantLabelStudioAccess, owner: String, repo: String, teamid: Long) = { + val await = Try(Await.result(grantLabelStudioTeamAccessAsync(body, owner, repo, teamid), Duration.Inf)) + await match { + case Success(i) => Some(await.get) + case Failure(t) => None + } + } + + /** + * Grant team access to annotation projects asynchronously + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * + * @param body + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @return Future(void) + */ + def grantLabelStudioTeamAccessAsync(body: GrantLabelStudioAccess, owner: String, repo: String, teamid: Long) = { + helper.grantLabelStudioTeamAccess(body, owner, repo, teamid) + } + + /** + * Grant user access to annotation projects + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * + * @param body + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @return void + */ + def grantLabelStudioUserAccess(body: GrantLabelStudioAccess, owner: String, repo: String, userid: Long) = { + val await = Try(Await.result(grantLabelStudioUserAccessAsync(body, owner, repo, userid), Duration.Inf)) + await match { + case Success(i) => Some(await.get) + case Failure(t) => None + } + } + + /** + * Grant user access to annotation projects asynchronously + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * + * @param body + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @return Future(void) + */ + def grantLabelStudioUserAccessAsync(body: GrantLabelStudioAccess, owner: String, repo: String, userid: Long) = { + helper.grantLabelStudioUserAccess(body, owner, repo, userid) + } + + /** + * List team access entries for annotation projects + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * + * @param owner owner of the repository + * @param repo name of the repository + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return List[LabelStudioProjectAccess] + */ + def listLabelStudioTeamAccess(owner: String, repo: String, projectId: Option[Long] = None): Option[List[LabelStudioProjectAccess]] = { + val await = Try(Await.result(listLabelStudioTeamAccessAsync(owner, repo, projectId), Duration.Inf)) + await match { + case Success(i) => Some(await.get) + case Failure(t) => None + } + } + + /** + * List team access entries for annotation projects asynchronously + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * + * @param owner owner of the repository + * @param repo name of the repository + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return Future(List[LabelStudioProjectAccess]) + */ + def listLabelStudioTeamAccessAsync(owner: String, repo: String, projectId: Option[Long] = None): Future[List[LabelStudioProjectAccess]] = { + helper.listLabelStudioTeamAccess(owner, repo, projectId) + } + + /** + * List user access entries for annotation projects + * Get a list of users with access to Label Studio annotation projects in the repository + * + * @param owner owner of the repository + * @param repo name of the repository + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return List[LabelStudioProjectAccess] + */ + def listLabelStudioUserAccess(owner: String, repo: String, projectId: Option[Long] = None): Option[List[LabelStudioProjectAccess]] = { + val await = Try(Await.result(listLabelStudioUserAccessAsync(owner, repo, projectId), Duration.Inf)) + await match { + case Success(i) => Some(await.get) + case Failure(t) => None + } + } + + /** + * List user access entries for annotation projects asynchronously + * Get a list of users with access to Label Studio annotation projects in the repository + * + * @param owner owner of the repository + * @param repo name of the repository + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return Future(List[LabelStudioProjectAccess]) + */ + def listLabelStudioUserAccessAsync(owner: String, repo: String, projectId: Option[Long] = None): Future[List[LabelStudioProjectAccess]] = { + helper.listLabelStudioUserAccess(owner, repo, projectId) + } + + /** + * Revoke team access to annotation projects + * Revoke a team's access to Label Studio annotation projects + * + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return void + */ + def revokeLabelStudioTeamAccess(owner: String, repo: String, teamid: Long, projectId: Option[Long] = None) = { + val await = Try(Await.result(revokeLabelStudioTeamAccessAsync(owner, repo, teamid, projectId), Duration.Inf)) + await match { + case Success(i) => Some(await.get) + case Failure(t) => None + } + } + + /** + * Revoke team access to annotation projects asynchronously + * Revoke a team's access to Label Studio annotation projects + * + * @param owner owner of the repository + * @param repo name of the repository + * @param teamid Team ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return Future(void) + */ + def revokeLabelStudioTeamAccessAsync(owner: String, repo: String, teamid: Long, projectId: Option[Long] = None) = { + helper.revokeLabelStudioTeamAccess(owner, repo, teamid, projectId) + } + + /** + * Revoke user access to annotation projects + * Revoke a user's access to Label Studio annotation projects + * + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return void + */ + def revokeLabelStudioUserAccess(owner: String, repo: String, userid: Long, projectId: Option[Long] = None) = { + val await = Try(Await.result(revokeLabelStudioUserAccessAsync(owner, repo, userid, projectId), Duration.Inf)) + await match { + case Success(i) => Some(await.get) + case Failure(t) => None + } + } + + /** + * Revoke user access to annotation projects asynchronously + * Revoke a user's access to Label Studio annotation projects + * + * @param owner owner of the repository + * @param repo name of the repository + * @param userid User ID + * @param projectId Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + * @return Future(void) + */ + def revokeLabelStudioUserAccessAsync(owner: String, repo: String, userid: Long, projectId: Option[Long] = None) = { + helper.revokeLabelStudioUserAccess(owner, repo, userid, projectId) + } + +} + +class AnnotationsApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { + + def getLabelStudioTeamAccess(owner: String, + repo: String, + teamid: Long, + projectId: Option[Long] = None + )(implicit reader: ClientResponseReader[LabelStudioProjectAccess]): Future[LabelStudioProjectAccess] = { + // create path and map variables + val path = (addFmt("/repos/{owner}/{repo}/annotations/access/teams/{teamid}") + replaceAll("\\{" + "owner" + "\\}", owner.toString) + replaceAll("\\{" + "repo" + "\\}", repo.toString) + replaceAll("\\{" + "teamid" + "\\}", teamid.toString)) + + // query params + val queryParams = new mutable.HashMap[String, String] + val headerParams = new mutable.HashMap[String, String] + + if (owner == null) throw new Exception("Missing required parameter 'owner' when calling AnnotationsApi->getLabelStudioTeamAccess") + + if (repo == null) throw new Exception("Missing required parameter 'repo' when calling AnnotationsApi->getLabelStudioTeamAccess") + + projectId match { + case Some(param) => queryParams += "project_id" -> param.toString + case _ => queryParams + } + + val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") + resFuture flatMap { resp => + process(reader.read(resp)) + } + } + + def getLabelStudioUserAccess(owner: String, + repo: String, + userid: Long, + projectId: Option[Long] = None + )(implicit reader: ClientResponseReader[inline_response_200]): Future[inline_response_200] = { + // create path and map variables + val path = (addFmt("/repos/{owner}/{repo}/annotations/access/users/{userid}") + replaceAll("\\{" + "owner" + "\\}", owner.toString) + replaceAll("\\{" + "repo" + "\\}", repo.toString) + replaceAll("\\{" + "userid" + "\\}", userid.toString)) + + // query params + val queryParams = new mutable.HashMap[String, String] + val headerParams = new mutable.HashMap[String, String] + + if (owner == null) throw new Exception("Missing required parameter 'owner' when calling AnnotationsApi->getLabelStudioUserAccess") + + if (repo == null) throw new Exception("Missing required parameter 'repo' when calling AnnotationsApi->getLabelStudioUserAccess") + + projectId match { + case Some(param) => queryParams += "project_id" -> param.toString + case _ => queryParams + } + + val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") + resFuture flatMap { resp => + process(reader.read(resp)) + } + } + + def grantLabelStudioTeamAccess(body: GrantLabelStudioAccess, + owner: String, + repo: String, + teamid: Long)(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[GrantLabelStudioAccess]): Future[Unit] = { + // create path and map variables + val path = (addFmt("/repos/{owner}/{repo}/annotations/access/teams/{teamid}") + replaceAll("\\{" + "owner" + "\\}", owner.toString) + replaceAll("\\{" + "repo" + "\\}", repo.toString) + replaceAll("\\{" + "teamid" + "\\}", teamid.toString)) + + // query params + val queryParams = new mutable.HashMap[String, String] + val headerParams = new mutable.HashMap[String, String] + + if (body == null) throw new Exception("Missing required parameter 'body' when calling AnnotationsApi->grantLabelStudioTeamAccess") + if (owner == null) throw new Exception("Missing required parameter 'owner' when calling AnnotationsApi->grantLabelStudioTeamAccess") + + if (repo == null) throw new Exception("Missing required parameter 'repo' when calling AnnotationsApi->grantLabelStudioTeamAccess") + + + val resFuture = client.submit("PUT", path, queryParams.toMap, headerParams.toMap, writer.write(body)) + resFuture flatMap { resp => + process(reader.read(resp)) + } + } + + def grantLabelStudioUserAccess(body: GrantLabelStudioAccess, + owner: String, + repo: String, + userid: Long)(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[GrantLabelStudioAccess]): Future[Unit] = { + // create path and map variables + val path = (addFmt("/repos/{owner}/{repo}/annotations/access/users/{userid}") + replaceAll("\\{" + "owner" + "\\}", owner.toString) + replaceAll("\\{" + "repo" + "\\}", repo.toString) + replaceAll("\\{" + "userid" + "\\}", userid.toString)) + + // query params + val queryParams = new mutable.HashMap[String, String] + val headerParams = new mutable.HashMap[String, String] + + if (body == null) throw new Exception("Missing required parameter 'body' when calling AnnotationsApi->grantLabelStudioUserAccess") + if (owner == null) throw new Exception("Missing required parameter 'owner' when calling AnnotationsApi->grantLabelStudioUserAccess") + + if (repo == null) throw new Exception("Missing required parameter 'repo' when calling AnnotationsApi->grantLabelStudioUserAccess") + + + val resFuture = client.submit("PUT", path, queryParams.toMap, headerParams.toMap, writer.write(body)) + resFuture flatMap { resp => + process(reader.read(resp)) + } + } + + def listLabelStudioTeamAccess(owner: String, + repo: String, + projectId: Option[Long] = None + )(implicit reader: ClientResponseReader[List[LabelStudioProjectAccess]]): Future[List[LabelStudioProjectAccess]] = { + // create path and map variables + val path = (addFmt("/repos/{owner}/{repo}/annotations/access/teams") + replaceAll("\\{" + "owner" + "\\}", owner.toString) + replaceAll("\\{" + "repo" + "\\}", repo.toString)) + + // query params + val queryParams = new mutable.HashMap[String, String] + val headerParams = new mutable.HashMap[String, String] + + if (owner == null) throw new Exception("Missing required parameter 'owner' when calling AnnotationsApi->listLabelStudioTeamAccess") + + if (repo == null) throw new Exception("Missing required parameter 'repo' when calling AnnotationsApi->listLabelStudioTeamAccess") + + projectId match { + case Some(param) => queryParams += "project_id" -> param.toString + case _ => queryParams + } + + val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") + resFuture flatMap { resp => + process(reader.read(resp)) + } + } + + def listLabelStudioUserAccess(owner: String, + repo: String, + projectId: Option[Long] = None + )(implicit reader: ClientResponseReader[List[LabelStudioProjectAccess]]): Future[List[LabelStudioProjectAccess]] = { + // create path and map variables + val path = (addFmt("/repos/{owner}/{repo}/annotations/access/users") + replaceAll("\\{" + "owner" + "\\}", owner.toString) + replaceAll("\\{" + "repo" + "\\}", repo.toString)) + + // query params + val queryParams = new mutable.HashMap[String, String] + val headerParams = new mutable.HashMap[String, String] + + if (owner == null) throw new Exception("Missing required parameter 'owner' when calling AnnotationsApi->listLabelStudioUserAccess") + + if (repo == null) throw new Exception("Missing required parameter 'repo' when calling AnnotationsApi->listLabelStudioUserAccess") + + projectId match { + case Some(param) => queryParams += "project_id" -> param.toString + case _ => queryParams + } + + val resFuture = client.submit("GET", path, queryParams.toMap, headerParams.toMap, "") + resFuture flatMap { resp => + process(reader.read(resp)) + } + } + + def revokeLabelStudioTeamAccess(owner: String, + repo: String, + teamid: Long, + projectId: Option[Long] = None + )(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { + // create path and map variables + val path = (addFmt("/repos/{owner}/{repo}/annotations/access/teams/{teamid}") + replaceAll("\\{" + "owner" + "\\}", owner.toString) + replaceAll("\\{" + "repo" + "\\}", repo.toString) + replaceAll("\\{" + "teamid" + "\\}", teamid.toString)) + + // query params + val queryParams = new mutable.HashMap[String, String] + val headerParams = new mutable.HashMap[String, String] + + if (owner == null) throw new Exception("Missing required parameter 'owner' when calling AnnotationsApi->revokeLabelStudioTeamAccess") + + if (repo == null) throw new Exception("Missing required parameter 'repo' when calling AnnotationsApi->revokeLabelStudioTeamAccess") + + projectId match { + case Some(param) => queryParams += "project_id" -> param.toString + case _ => queryParams + } + + val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "") + resFuture flatMap { resp => + process(reader.read(resp)) + } + } + + def revokeLabelStudioUserAccess(owner: String, + repo: String, + userid: Long, + projectId: Option[Long] = None + )(implicit reader: ClientResponseReader[Unit]): Future[Unit] = { + // create path and map variables + val path = (addFmt("/repos/{owner}/{repo}/annotations/access/users/{userid}") + replaceAll("\\{" + "owner" + "\\}", owner.toString) + replaceAll("\\{" + "repo" + "\\}", repo.toString) + replaceAll("\\{" + "userid" + "\\}", userid.toString)) + + // query params + val queryParams = new mutable.HashMap[String, String] + val headerParams = new mutable.HashMap[String, String] + + if (owner == null) throw new Exception("Missing required parameter 'owner' when calling AnnotationsApi->revokeLabelStudioUserAccess") + + if (repo == null) throw new Exception("Missing required parameter 'repo' when calling AnnotationsApi->revokeLabelStudioUserAccess") + + projectId match { + case Some(param) => queryParams += "project_id" -> param.toString + case _ => queryParams + } + + val resFuture = client.submit("DELETE", path, queryParams.toMap, headerParams.toMap, "") + resFuture flatMap { resp => + process(reader.read(resp)) + } + } + + +} diff --git a/Scala/src/main/scala/io/swagger/client/api/BranchesApi.scala b/Scala/src/main/scala/io/swagger/client/api/BranchesApi.scala index 847b33a..d00e4a3 100644 --- a/Scala/src/main/scala/io/swagger/client/api/BranchesApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/BranchesApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/api/CollaboratorsApi.scala b/Scala/src/main/scala/io/swagger/client/api/CollaboratorsApi.scala index 6aec03e..5aaf652 100644 --- a/Scala/src/main/scala/io/swagger/client/api/CollaboratorsApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/CollaboratorsApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/api/CommitsApi.scala b/Scala/src/main/scala/io/swagger/client/api/CommitsApi.scala index a85a3f3..871bc94 100644 --- a/Scala/src/main/scala/io/swagger/client/api/CommitsApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/CommitsApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/api/ContentApi.scala b/Scala/src/main/scala/io/swagger/client/api/ContentApi.scala index 6403023..9828811 100644 --- a/Scala/src/main/scala/io/swagger/client/api/ContentApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/ContentApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/api/ExperimentsApi.scala b/Scala/src/main/scala/io/swagger/client/api/ExperimentsApi.scala index 1f9f0d0..fcc0d51 100644 --- a/Scala/src/main/scala/io/swagger/client/api/ExperimentsApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/ExperimentsApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/api/IssuesApi.scala b/Scala/src/main/scala/io/swagger/client/api/IssuesApi.scala index 7c0069d..c24d4f2 100644 --- a/Scala/src/main/scala/io/swagger/client/api/IssuesApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/IssuesApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/api/OrganizationsApi.scala b/Scala/src/main/scala/io/swagger/client/api/OrganizationsApi.scala new file mode 100644 index 0000000..df4cc48 --- /dev/null +++ b/Scala/src/main/scala/io/swagger/client/api/OrganizationsApi.scala @@ -0,0 +1,134 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.api + +import java.text.SimpleDateFormat + +import io.swagger.client.model.CreateAnnotatorTeam +import io.swagger.client.{ApiInvoker, ApiException} + +import com.sun.jersey.multipart.FormDataMultiPart +import com.sun.jersey.multipart.file.FileDataBodyPart + +import javax.ws.rs.core.MediaType + +import java.io.File +import java.util.Date +import java.util.TimeZone + +import scala.collection.mutable.HashMap + +import com.wordnik.swagger.client._ +import scala.concurrent.Future +import collection.mutable + +import java.net.URI + +import com.wordnik.swagger.client.ClientResponseReaders.Json4sFormatsReader._ +import com.wordnik.swagger.client.RequestWriters.Json4sFormatsWriter._ + +import scala.concurrent.ExecutionContext.Implicits.global +import scala.concurrent._ +import scala.concurrent.duration._ +import scala.util.{Failure, Success, Try} + +import org.json4s._ + +class OrganizationsApi( + val defBasePath: String = "https://dagshub.com/api/v1", + defApiInvoker: ApiInvoker = ApiInvoker +) { + private lazy val dateTimeFormatter = { + val formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") + formatter.setTimeZone(TimeZone.getTimeZone("UTC")) + formatter + } + private val dateFormatter = { + val formatter = new SimpleDateFormat("yyyy-MM-dd") + formatter.setTimeZone(TimeZone.getTimeZone("UTC")) + formatter + } + implicit val formats = new org.json4s.DefaultFormats { + override def dateFormatter = dateTimeFormatter + } + implicit val stringReader: ClientResponseReader[String] = ClientResponseReaders.StringReader + implicit val unitReader: ClientResponseReader[Unit] = ClientResponseReaders.UnitReader + implicit val jvalueReader: ClientResponseReader[JValue] = ClientResponseReaders.JValueReader + implicit val jsonReader: ClientResponseReader[Nothing] = JsonFormatsReader + implicit val stringWriter: RequestWriter[String] = RequestWriters.StringWriter + implicit val jsonWriter: RequestWriter[Nothing] = JsonFormatsWriter + + var basePath: String = defBasePath + var apiInvoker: ApiInvoker = defApiInvoker + + def addHeader(key: String, value: String): mutable.HashMap[String, String] = { + apiInvoker.defaultHeaders += key -> value + } + + val config: SwaggerConfig = SwaggerConfig.forUrl(new URI(defBasePath)) + val client = new RestClient(config) + val helper = new OrganizationsApiAsyncHelper(client, config) + + /** + * Create an organization team + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * + * @param body + * @param orgname A DagsHub organization name + * @return void + */ + def createOrgTeam(body: CreateAnnotatorTeam, orgname: String) = { + val await = Try(Await.result(createOrgTeamAsync(body, orgname), Duration.Inf)) + await match { + case Success(i) => Some(await.get) + case Failure(t) => None + } + } + + /** + * Create an organization team asynchronously + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * + * @param body + * @param orgname A DagsHub organization name + * @return Future(void) + */ + def createOrgTeamAsync(body: CreateAnnotatorTeam, orgname: String) = { + helper.createOrgTeam(body, orgname) + } + +} + +class OrganizationsApiAsyncHelper(client: TransportClient, config: SwaggerConfig) extends ApiClient(client, config) { + + def createOrgTeam(body: CreateAnnotatorTeam, + orgname: String)(implicit reader: ClientResponseReader[Unit], writer: RequestWriter[CreateAnnotatorTeam]): Future[Unit] = { + // create path and map variables + val path = (addFmt("/admin/orgs/{orgname}/teams") + replaceAll("\\{" + "orgname" + "\\}", orgname.toString)) + + // query params + val queryParams = new mutable.HashMap[String, String] + val headerParams = new mutable.HashMap[String, String] + + if (body == null) throw new Exception("Missing required parameter 'body' when calling OrganizationsApi->createOrgTeam") + if (orgname == null) throw new Exception("Missing required parameter 'orgname' when calling OrganizationsApi->createOrgTeam") + + + val resFuture = client.submit("POST", path, queryParams.toMap, headerParams.toMap, writer.write(body)) + resFuture flatMap { resp => + process(reader.read(resp)) + } + } + + +} diff --git a/Scala/src/main/scala/io/swagger/client/api/ReleasesApi.scala b/Scala/src/main/scala/io/swagger/client/api/ReleasesApi.scala index 98fbe65..848ca1d 100644 --- a/Scala/src/main/scala/io/swagger/client/api/ReleasesApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/ReleasesApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/api/RepositoryApi.scala b/Scala/src/main/scala/io/swagger/client/api/RepositoryApi.scala index 61e7dce..500e8a0 100644 --- a/Scala/src/main/scala/io/swagger/client/api/RepositoryApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/RepositoryApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/api/StorageIntegrationsApi.scala b/Scala/src/main/scala/io/swagger/client/api/StorageIntegrationsApi.scala index 92c5164..df099cd 100644 --- a/Scala/src/main/scala/io/swagger/client/api/StorageIntegrationsApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/StorageIntegrationsApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -90,11 +90,12 @@ class StorageIntegrationsApi( * @param `path` path of a folder in the repository * @param includeSize (optional, default to false) * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) + * @param paging Whether or not paging is enabled (optional, default to false) + * @param fromToken [Only if paging is enabled] token, from which to continue iteration (optional) * @return Files_1 */ - def getBucketContent(owner: String, repo: String, protocol: String, bucket: String, `path`: String, includeSize: Option[Boolean] = Option(false), limit: Option[Integer] = Option(100), fromToken: Option[String] = None): Option[Files_1] = { - val await = Try(Await.result(getBucketContentAsync(owner, repo, protocol, bucket, `path`, includeSize, limit, fromToken), Duration.Inf)) + def getBucketContent(owner: String, repo: String, protocol: String, bucket: String, `path`: String, includeSize: Option[Boolean] = Option(false), limit: Option[Integer] = Option(100), paging: Option[Boolean] = Option(false), fromToken: Option[String] = None): Option[Files_1] = { + val await = Try(Await.result(getBucketContentAsync(owner, repo, protocol, bucket, `path`, includeSize, limit, paging, fromToken), Duration.Inf)) await match { case Success(i) => Some(await.get) case Failure(t) => None @@ -112,11 +113,12 @@ class StorageIntegrationsApi( * @param `path` path of a folder in the repository * @param includeSize (optional, default to false) * @param limit Maximum amount of items to return (optional, default to 100) - * @param fromToken Token, from which to continue iteration (optional) + * @param paging Whether or not paging is enabled (optional, default to false) + * @param fromToken [Only if paging is enabled] token, from which to continue iteration (optional) * @return Future(Files_1) */ - def getBucketContentAsync(owner: String, repo: String, protocol: String, bucket: String, `path`: String, includeSize: Option[Boolean] = Option(false), limit: Option[Integer] = Option(100), fromToken: Option[String] = None): Future[Files_1] = { - helper.getBucketContent(owner, repo, protocol, bucket, `path`, includeSize, limit, fromToken) + def getBucketContentAsync(owner: String, repo: String, protocol: String, bucket: String, `path`: String, includeSize: Option[Boolean] = Option(false), limit: Option[Integer] = Option(100), paging: Option[Boolean] = Option(false), fromToken: Option[String] = None): Future[Files_1] = { + helper.getBucketContent(owner, repo, protocol, bucket, `path`, includeSize, limit, paging, fromToken) } /** @@ -192,6 +194,7 @@ class StorageIntegrationsApiAsyncHelper(client: TransportClient, config: Swagger `path`: String, includeSize: Option[Boolean] = Option(false), limit: Option[Integer] = Option(100), + paging: Option[Boolean] = Option(false), fromToken: Option[String] = None )(implicit reader: ClientResponseReader[Files_1]): Future[Files_1] = { // create path and map variables @@ -224,6 +227,10 @@ class StorageIntegrationsApiAsyncHelper(client: TransportClient, config: Swagger case Some(param) => queryParams += "limit" -> param.toString case _ => queryParams } + paging match { + case Some(param) => queryParams += "paging" -> param.toString + case _ => queryParams + } fromToken match { case Some(param) => queryParams += "from_token" -> param.toString case _ => queryParams diff --git a/Scala/src/main/scala/io/swagger/client/api/UserApi.scala b/Scala/src/main/scala/io/swagger/client/api/UserApi.scala index 79c10af..a7a8c6b 100644 --- a/Scala/src/main/scala/io/swagger/client/api/UserApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/UserApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/api/WebhooksApi.scala b/Scala/src/main/scala/io/swagger/client/api/WebhooksApi.scala index dfab8e2..fe8654d 100644 --- a/Scala/src/main/scala/io/swagger/client/api/WebhooksApi.scala +++ b/Scala/src/main/scala/io/swagger/client/api/WebhooksApi.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Assignee.scala b/Scala/src/main/scala/io/swagger/client/model/Assignee.scala index 918ff2e..a0e0a38 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Assignee.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Assignee.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Body.scala b/Scala/src/main/scala/io/swagger/client/model/Body.scala index fc414ee..714bdb5 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Body.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Body.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Closed.scala b/Scala/src/main/scala/io/swagger/client/model/Closed.scala index 71224f4..b108f6c 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Closed.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Closed.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/CollaboratorsCollaboratorBody.scala b/Scala/src/main/scala/io/swagger/client/model/CollaboratorsCollaboratorBody.scala index 3a75eab..2e14d72 100644 --- a/Scala/src/main/scala/io/swagger/client/model/CollaboratorsCollaboratorBody.scala +++ b/Scala/src/main/scala/io/swagger/client/model/CollaboratorsCollaboratorBody.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/CreateAnnotatorTeam.scala b/Scala/src/main/scala/io/swagger/client/model/CreateAnnotatorTeam.scala new file mode 100644 index 0000000..6e1f122 --- /dev/null +++ b/Scala/src/main/scala/io/swagger/client/model/CreateAnnotatorTeam.scala @@ -0,0 +1,27 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.model + + +/** + * @param name Team name for example: '''Data Annotators''' + * @param description Team description for example: '''Team for annotation work''' + * @param teamType Type of team - normal teams have repository access, annotator teams only have annotation project access + * @param permission Repository permission level (required for normal teams, ignored for annotator teams) + */ +case class CreateAnnotatorTeam ( + name: String, + description: Option[String] = None, + teamType: Option[String] = None, + permission: Option[String] = None +) + diff --git a/Scala/src/main/scala/io/swagger/client/model/CreateRepo.scala b/Scala/src/main/scala/io/swagger/client/model/CreateRepo.scala index cdb8df2..b2145bb 100644 --- a/Scala/src/main/scala/io/swagger/client/model/CreateRepo.scala +++ b/Scala/src/main/scala/io/swagger/client/model/CreateRepo.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/EditExperimentPost.scala b/Scala/src/main/scala/io/swagger/client/model/EditExperimentPost.scala index 7c3577e..dd494ad 100644 --- a/Scala/src/main/scala/io/swagger/client/model/EditExperimentPost.scala +++ b/Scala/src/main/scala/io/swagger/client/model/EditExperimentPost.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/ExperimentKeys.scala b/Scala/src/main/scala/io/swagger/client/model/ExperimentKeys.scala index 47f31f6..1894bf1 100644 --- a/Scala/src/main/scala/io/swagger/client/model/ExperimentKeys.scala +++ b/Scala/src/main/scala/io/swagger/client/model/ExperimentKeys.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Files.scala b/Scala/src/main/scala/io/swagger/client/model/Files.scala index 8b5691c..9fdd0f0 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Files.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Files.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Files1.scala b/Scala/src/main/scala/io/swagger/client/model/Files1.scala index 0cc5828..22a9d93 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Files1.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Files1.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -15,12 +15,10 @@ import java.io.File /** * @param entries - * @param limit - * @param nextToken + * @param nextToken Next token to continue pagination from */ case class Files1 ( entries: Option[List[File]] = None, - limit: Option[Integer] = None, nextToken: Option[String] = None ) diff --git a/Scala/src/main/scala/io/swagger/client/model/GrantLabelStudioAccess.scala b/Scala/src/main/scala/io/swagger/client/model/GrantLabelStudioAccess.scala new file mode 100644 index 0000000..a8da79c --- /dev/null +++ b/Scala/src/main/scala/io/swagger/client/model/GrantLabelStudioAccess.scala @@ -0,0 +1,23 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.model + + +/** + * @param projectId Project ID, -1 for wildcard access to all projects for example: '''-1''' + * @param accessLevel Access level to grant + */ +case class GrantLabelStudioAccess ( + projectId: Long, + accessLevel: Option[String] = None +) + diff --git a/Scala/src/main/scala/io/swagger/client/model/HooksIdBody.scala b/Scala/src/main/scala/io/swagger/client/model/HooksIdBody.scala index f60319c..2fac19b 100644 --- a/Scala/src/main/scala/io/swagger/client/model/HooksIdBody.scala +++ b/Scala/src/main/scala/io/swagger/client/model/HooksIdBody.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala b/Scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala new file mode 100644 index 0000000..7417c50 --- /dev/null +++ b/Scala/src/main/scala/io/swagger/client/model/InlineResponse200.scala @@ -0,0 +1,25 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.model + + +/** + * @param userId + * @param projectId + * @param accessLevel + */ +case class InlineResponse200 ( + userId: Option[Long] = None, + projectId: Option[Long] = None, + accessLevel: Option[String] = None +) + diff --git a/Scala/src/main/scala/io/swagger/client/model/Integration.scala b/Scala/src/main/scala/io/swagger/client/model/Integration.scala index 4de41ba..a0d6585 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Integration.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Integration.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/IntegrationInner.scala b/Scala/src/main/scala/io/swagger/client/model/IntegrationInner.scala index 39fad96..8fa832f 100644 --- a/Scala/src/main/scala/io/swagger/client/model/IntegrationInner.scala +++ b/Scala/src/main/scala/io/swagger/client/model/IntegrationInner.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Issue.scala b/Scala/src/main/scala/io/swagger/client/model/Issue.scala index b65fd0a..da33fa7 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Issue.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Issue.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/IssueAssignee.scala b/Scala/src/main/scala/io/swagger/client/model/IssueAssignee.scala index 853780c..7ccd77b 100644 --- a/Scala/src/main/scala/io/swagger/client/model/IssueAssignee.scala +++ b/Scala/src/main/scala/io/swagger/client/model/IssueAssignee.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/IssueLabels.scala b/Scala/src/main/scala/io/swagger/client/model/IssueLabels.scala index e8ae56b..65ab378 100644 --- a/Scala/src/main/scala/io/swagger/client/model/IssueLabels.scala +++ b/Scala/src/main/scala/io/swagger/client/model/IssueLabels.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/IssueMilestone.scala b/Scala/src/main/scala/io/swagger/client/model/IssueMilestone.scala index 1f81cb0..ebc1bab 100644 --- a/Scala/src/main/scala/io/swagger/client/model/IssueMilestone.scala +++ b/Scala/src/main/scala/io/swagger/client/model/IssueMilestone.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Issues.scala b/Scala/src/main/scala/io/swagger/client/model/Issues.scala index 9dce607..fea81d0 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Issues.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Issues.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/LabelStudioProjectAccess.scala b/Scala/src/main/scala/io/swagger/client/model/LabelStudioProjectAccess.scala new file mode 100644 index 0000000..d2113ca --- /dev/null +++ b/Scala/src/main/scala/io/swagger/client/model/LabelStudioProjectAccess.scala @@ -0,0 +1,35 @@ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +package io.swagger.client.model + + +/** + * @param id + * @param repoId + * @param projectId Project ID, -1 means wildcard access to all projects + * @param userId User ID (present for user access entries) + * @param teamId Team ID (present for team access entries) + * @param accessLevel + * @param createdUnix + * @param user + */ +case class LabelStudioProjectAccess ( + id: Option[Long] = None, + repoId: Option[Long] = None, + projectId: Option[Long] = None, + userId: Option[Long] = None, + teamId: Option[Long] = None, + accessLevel: Option[String] = None, + createdUnix: Option[Long] = None, + user: Option[User] = None +) + diff --git a/Scala/src/main/scala/io/swagger/client/model/Labels.scala b/Scala/src/main/scala/io/swagger/client/model/Labels.scala index b6eaefe..72a3685 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Labels.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Labels.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/MigrateRepo.scala b/Scala/src/main/scala/io/swagger/client/model/MigrateRepo.scala index 8642dda..dcc97b9 100644 --- a/Scala/src/main/scala/io/swagger/client/model/MigrateRepo.scala +++ b/Scala/src/main/scala/io/swagger/client/model/MigrateRepo.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Milestone.scala b/Scala/src/main/scala/io/swagger/client/model/Milestone.scala index 6796f2c..96c4171 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Milestone.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Milestone.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/PatchIssue.scala b/Scala/src/main/scala/io/swagger/client/model/PatchIssue.scala index 9dd2a20..b1e5c9e 100644 --- a/Scala/src/main/scala/io/swagger/client/model/PatchIssue.scala +++ b/Scala/src/main/scala/io/swagger/client/model/PatchIssue.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/PostIssue.scala b/Scala/src/main/scala/io/swagger/client/model/PostIssue.scala index d5763c8..1329fb3 100644 --- a/Scala/src/main/scala/io/swagger/client/model/PostIssue.scala +++ b/Scala/src/main/scala/io/swagger/client/model/PostIssue.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/PutFile.scala b/Scala/src/main/scala/io/swagger/client/model/PutFile.scala index 2b14cca..16a6759 100644 --- a/Scala/src/main/scala/io/swagger/client/model/PutFile.scala +++ b/Scala/src/main/scala/io/swagger/client/model/PutFile.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/RepoHooksBody.scala b/Scala/src/main/scala/io/swagger/client/model/RepoHooksBody.scala index 32661be..54cf28f 100644 --- a/Scala/src/main/scala/io/swagger/client/model/RepoHooksBody.scala +++ b/Scala/src/main/scala/io/swagger/client/model/RepoHooksBody.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/State.scala b/Scala/src/main/scala/io/swagger/client/model/State.scala index 577bbc4..aae190e 100644 --- a/Scala/src/main/scala/io/swagger/client/model/State.scala +++ b/Scala/src/main/scala/io/swagger/client/model/State.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/Title.scala b/Scala/src/main/scala/io/swagger/client/model/Title.scala index 34438a7..f4986ab 100644 --- a/Scala/src/main/scala/io/swagger/client/model/Title.scala +++ b/Scala/src/main/scala/io/swagger/client/model/Title.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/User.scala b/Scala/src/main/scala/io/swagger/client/model/User.scala index 00ab209..9ccc5b2 100644 --- a/Scala/src/main/scala/io/swagger/client/model/User.scala +++ b/Scala/src/main/scala/io/swagger/client/model/User.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/WebhookConfig.scala b/Scala/src/main/scala/io/swagger/client/model/WebhookConfig.scala index 09dacfe..6c48b79 100644 --- a/Scala/src/main/scala/io/swagger/client/model/WebhookConfig.scala +++ b/Scala/src/main/scala/io/swagger/client/model/WebhookConfig.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Scala/src/main/scala/io/swagger/client/model/WebhookEvents.scala b/Scala/src/main/scala/io/swagger/client/model/WebhookEvents.scala index b21ac76..265c6bd 100644 --- a/Scala/src/main/scala/io/swagger/client/model/WebhookEvents.scala +++ b/Scala/src/main/scala/io/swagger/client/model/WebhookEvents.scala @@ -2,7 +2,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/AnnotationsAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/AnnotationsAPI.swift new file mode 100644 index 0000000..bb8db5e --- /dev/null +++ b/Swift/SwaggerClient/Classes/Swaggers/APIs/AnnotationsAPI.swift @@ -0,0 +1,544 @@ +// +// AnnotationsAPI.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation +import Alamofire + + +open class AnnotationsAPI { + /** + Get team access level for annotation projects + + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter teamid: (path) Team ID + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getLabelStudioTeamAccess(owner: String, repo: String, teamid: Int64, projectId: Int64? = nil, completion: @escaping ((_ data: LabelStudioProjectAccess?,_ error: Error?) -> Void)) { + getLabelStudioTeamAccessWithRequestBuilder(owner: owner, repo: repo, teamid: teamid, projectId: projectId).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + Get team access level for annotation projects + - GET /repos/{owner}/{repo}/annotations/access/teams/{teamid} + + - BASIC: + - type: http + - name: basicAuth + - API Key: + - type: apiKey token (QUERY) + - name: tokenAuth + - examples: [{contentType=application/json, example={ + "access_level" : "none", + "project_id" : 1, + "user_id" : 5, + "repo_id" : 6, + "created_unix" : 2, + "id" : 0, + "team_id" : 5, + "user" : { + "full_name" : "full_name", + "avatar_url" : "avatar_url", + "id" : 7, + "login" : "login", + "username" : "username" + } +}}] + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter teamid: (path) Team ID + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + - returns: RequestBuilder + */ + open class func getLabelStudioTeamAccessWithRequestBuilder(owner: String, repo: String, teamid: Int64, projectId: Int64? = nil) -> RequestBuilder { + var path = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + let ownerPreEscape = "\(owner)" + let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) + let repoPreEscape = "\(repo)" + let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) + let teamidPreEscape = "\(teamid)" + let teamidPostEscape = teamidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{teamid}", with: teamidPostEscape, options: .literal, range: nil) + let URLString = SwaggerClientAPI.basePath + path + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "project_id": projectId?.encodeToJSON() + ]) + + + let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + /** + Get user access level for annotation projects + + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter userid: (path) User ID + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func getLabelStudioUserAccess(owner: String, repo: String, userid: Int64, projectId: Int64? = nil, completion: @escaping ((_ data: InlineResponse200?,_ error: Error?) -> Void)) { + getLabelStudioUserAccessWithRequestBuilder(owner: owner, repo: repo, userid: userid, projectId: projectId).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + Get user access level for annotation projects + - GET /repos/{owner}/{repo}/annotations/access/users/{userid} + + - BASIC: + - type: http + - name: basicAuth + - API Key: + - type: apiKey token (QUERY) + - name: tokenAuth + - examples: [{contentType=application/json, example={ + "access_level" : "none", + "user_id" : 0, + "project_id" : 6 +}}] + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter userid: (path) User ID + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + - returns: RequestBuilder + */ + open class func getLabelStudioUserAccessWithRequestBuilder(owner: String, repo: String, userid: Int64, projectId: Int64? = nil) -> RequestBuilder { + var path = "/repos/{owner}/{repo}/annotations/access/users/{userid}" + let ownerPreEscape = "\(owner)" + let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) + let repoPreEscape = "\(repo)" + let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) + let useridPreEscape = "\(userid)" + let useridPostEscape = useridPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{userid}", with: useridPostEscape, options: .literal, range: nil) + let URLString = SwaggerClientAPI.basePath + path + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "project_id": projectId?.encodeToJSON() + ]) + + + let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + /** + Grant team access to annotation projects + + - parameter body: (body) + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter teamid: (path) Team ID + - parameter completion: completion handler to receive the data and the error objects + */ + open class func grantLabelStudioTeamAccess(body: GrantLabelStudioAccess, owner: String, repo: String, teamid: Int64, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + grantLabelStudioTeamAccessWithRequestBuilder(body: body, owner: owner, repo: repo, teamid: teamid).execute { (response, error) -> Void in + if error == nil { + completion((), error) + } else { + completion(nil, error) + } + } + } + + + /** + Grant team access to annotation projects + - PUT /repos/{owner}/{repo}/annotations/access/teams/{teamid} + + - BASIC: + - type: http + - name: basicAuth + - API Key: + - type: apiKey token (QUERY) + - name: tokenAuth + - parameter body: (body) + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter teamid: (path) Team ID + + - returns: RequestBuilder + */ + open class func grantLabelStudioTeamAccessWithRequestBuilder(body: GrantLabelStudioAccess, owner: String, repo: String, teamid: Int64) -> RequestBuilder { + var path = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + let ownerPreEscape = "\(owner)" + let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) + let repoPreEscape = "\(repo)" + let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) + let teamidPreEscape = "\(teamid)" + let teamidPostEscape = teamidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{teamid}", with: teamidPostEscape, options: .literal, range: nil) + let URLString = SwaggerClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let url = URLComponents(string: URLString) + + + let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + /** + Grant user access to annotation projects + + - parameter body: (body) + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter userid: (path) User ID + - parameter completion: completion handler to receive the data and the error objects + */ + open class func grantLabelStudioUserAccess(body: GrantLabelStudioAccess, owner: String, repo: String, userid: Int64, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + grantLabelStudioUserAccessWithRequestBuilder(body: body, owner: owner, repo: repo, userid: userid).execute { (response, error) -> Void in + if error == nil { + completion((), error) + } else { + completion(nil, error) + } + } + } + + + /** + Grant user access to annotation projects + - PUT /repos/{owner}/{repo}/annotations/access/users/{userid} + + - BASIC: + - type: http + - name: basicAuth + - API Key: + - type: apiKey token (QUERY) + - name: tokenAuth + - parameter body: (body) + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter userid: (path) User ID + + - returns: RequestBuilder + */ + open class func grantLabelStudioUserAccessWithRequestBuilder(body: GrantLabelStudioAccess, owner: String, repo: String, userid: Int64) -> RequestBuilder { + var path = "/repos/{owner}/{repo}/annotations/access/users/{userid}" + let ownerPreEscape = "\(owner)" + let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) + let repoPreEscape = "\(repo)" + let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) + let useridPreEscape = "\(userid)" + let useridPostEscape = useridPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{userid}", with: useridPostEscape, options: .literal, range: nil) + let URLString = SwaggerClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let url = URLComponents(string: URLString) + + + let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "PUT", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } + /** + List team access entries for annotation projects + + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func listLabelStudioTeamAccess(owner: String, repo: String, projectId: Int64? = nil, completion: @escaping ((_ data: [LabelStudioProjectAccess]?,_ error: Error?) -> Void)) { + listLabelStudioTeamAccessWithRequestBuilder(owner: owner, repo: repo, projectId: projectId).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + List team access entries for annotation projects + - GET /repos/{owner}/{repo}/annotations/access/teams + + - BASIC: + - type: http + - name: basicAuth + - API Key: + - type: apiKey token (QUERY) + - name: tokenAuth + - examples: [{contentType=application/json, example=[ { + "access_level" : "none", + "project_id" : 1, + "user_id" : 5, + "repo_id" : 6, + "created_unix" : 2, + "id" : 0, + "team_id" : 5, + "user" : { + "full_name" : "full_name", + "avatar_url" : "avatar_url", + "id" : 7, + "login" : "login", + "username" : "username" + } +}, { + "access_level" : "none", + "project_id" : 1, + "user_id" : 5, + "repo_id" : 6, + "created_unix" : 2, + "id" : 0, + "team_id" : 5, + "user" : { + "full_name" : "full_name", + "avatar_url" : "avatar_url", + "id" : 7, + "login" : "login", + "username" : "username" + } +} ]}] + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + - returns: RequestBuilder<[LabelStudioProjectAccess]> + */ + open class func listLabelStudioTeamAccessWithRequestBuilder(owner: String, repo: String, projectId: Int64? = nil) -> RequestBuilder<[LabelStudioProjectAccess]> { + var path = "/repos/{owner}/{repo}/annotations/access/teams" + let ownerPreEscape = "\(owner)" + let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) + let repoPreEscape = "\(repo)" + let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) + let URLString = SwaggerClientAPI.basePath + path + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "project_id": projectId?.encodeToJSON() + ]) + + + let requestBuilder: RequestBuilder<[LabelStudioProjectAccess]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + /** + List user access entries for annotation projects + + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func listLabelStudioUserAccess(owner: String, repo: String, projectId: Int64? = nil, completion: @escaping ((_ data: [LabelStudioProjectAccess]?,_ error: Error?) -> Void)) { + listLabelStudioUserAccessWithRequestBuilder(owner: owner, repo: repo, projectId: projectId).execute { (response, error) -> Void in + completion(response?.body, error) + } + } + + + /** + List user access entries for annotation projects + - GET /repos/{owner}/{repo}/annotations/access/users + + - BASIC: + - type: http + - name: basicAuth + - API Key: + - type: apiKey token (QUERY) + - name: tokenAuth + - examples: [{contentType=application/json, example=[ { + "access_level" : "none", + "project_id" : 1, + "user_id" : 5, + "repo_id" : 6, + "created_unix" : 2, + "id" : 0, + "team_id" : 5, + "user" : { + "full_name" : "full_name", + "avatar_url" : "avatar_url", + "id" : 7, + "login" : "login", + "username" : "username" + } +}, { + "access_level" : "none", + "project_id" : 1, + "user_id" : 5, + "repo_id" : 6, + "created_unix" : 2, + "id" : 0, + "team_id" : 5, + "user" : { + "full_name" : "full_name", + "avatar_url" : "avatar_url", + "id" : 7, + "login" : "login", + "username" : "username" + } +} ]}] + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + - returns: RequestBuilder<[LabelStudioProjectAccess]> + */ + open class func listLabelStudioUserAccessWithRequestBuilder(owner: String, repo: String, projectId: Int64? = nil) -> RequestBuilder<[LabelStudioProjectAccess]> { + var path = "/repos/{owner}/{repo}/annotations/access/users" + let ownerPreEscape = "\(owner)" + let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) + let repoPreEscape = "\(repo)" + let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) + let URLString = SwaggerClientAPI.basePath + path + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "project_id": projectId?.encodeToJSON() + ]) + + + let requestBuilder: RequestBuilder<[LabelStudioProjectAccess]>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder() + + return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + /** + Revoke team access to annotation projects + + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter teamid: (path) Team ID + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func revokeLabelStudioTeamAccess(owner: String, repo: String, teamid: Int64, projectId: Int64? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + revokeLabelStudioTeamAccessWithRequestBuilder(owner: owner, repo: repo, teamid: teamid, projectId: projectId).execute { (response, error) -> Void in + if error == nil { + completion((), error) + } else { + completion(nil, error) + } + } + } + + + /** + Revoke team access to annotation projects + - DELETE /repos/{owner}/{repo}/annotations/access/teams/{teamid} + + - BASIC: + - type: http + - name: basicAuth + - API Key: + - type: apiKey token (QUERY) + - name: tokenAuth + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter teamid: (path) Team ID + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + - returns: RequestBuilder + */ + open class func revokeLabelStudioTeamAccessWithRequestBuilder(owner: String, repo: String, teamid: Int64, projectId: Int64? = nil) -> RequestBuilder { + var path = "/repos/{owner}/{repo}/annotations/access/teams/{teamid}" + let ownerPreEscape = "\(owner)" + let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) + let repoPreEscape = "\(repo)" + let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) + let teamidPreEscape = "\(teamid)" + let teamidPostEscape = teamidPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{teamid}", with: teamidPostEscape, options: .literal, range: nil) + let URLString = SwaggerClientAPI.basePath + path + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "project_id": projectId?.encodeToJSON() + ]) + + + let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } + /** + Revoke user access to annotation projects + + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter userid: (path) User ID + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + - parameter completion: completion handler to receive the data and the error objects + */ + open class func revokeLabelStudioUserAccess(owner: String, repo: String, userid: Int64, projectId: Int64? = nil, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + revokeLabelStudioUserAccessWithRequestBuilder(owner: owner, repo: repo, userid: userid, projectId: projectId).execute { (response, error) -> Void in + if error == nil { + completion((), error) + } else { + completion(nil, error) + } + } + } + + + /** + Revoke user access to annotation projects + - DELETE /repos/{owner}/{repo}/annotations/access/users/{userid} + + - BASIC: + - type: http + - name: basicAuth + - API Key: + - type: apiKey token (QUERY) + - name: tokenAuth + - parameter owner: (path) owner of the repository + - parameter repo: (path) name of the repository + - parameter userid: (path) User ID + - parameter projectId: (query) Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. (optional) + + - returns: RequestBuilder + */ + open class func revokeLabelStudioUserAccessWithRequestBuilder(owner: String, repo: String, userid: Int64, projectId: Int64? = nil) -> RequestBuilder { + var path = "/repos/{owner}/{repo}/annotations/access/users/{userid}" + let ownerPreEscape = "\(owner)" + let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{owner}", with: ownerPostEscape, options: .literal, range: nil) + let repoPreEscape = "\(repo)" + let repoPostEscape = repoPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{repo}", with: repoPostEscape, options: .literal, range: nil) + let useridPreEscape = "\(userid)" + let useridPostEscape = useridPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{userid}", with: useridPostEscape, options: .literal, range: nil) + let URLString = SwaggerClientAPI.basePath + path + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) + url?.queryItems = APIHelper.mapValuesToQueryItems([ + "project_id": projectId?.encodeToJSON() + ]) + + + let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) + } +} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/OrganizationsAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/OrganizationsAPI.swift new file mode 100644 index 0000000..c01b5c6 --- /dev/null +++ b/Swift/SwaggerClient/Classes/Swaggers/APIs/OrganizationsAPI.swift @@ -0,0 +1,60 @@ +// +// OrganizationsAPI.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation +import Alamofire + + +open class OrganizationsAPI { + /** + Create an organization team + + - parameter body: (body) + - parameter orgname: (path) A DagsHub organization name + - parameter completion: completion handler to receive the data and the error objects + */ + open class func createOrgTeam(body: CreateAnnotatorTeam, orgname: String, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { + createOrgTeamWithRequestBuilder(body: body, orgname: orgname).execute { (response, error) -> Void in + if error == nil { + completion((), error) + } else { + completion(nil, error) + } + } + } + + + /** + Create an organization team + - POST /admin/orgs/{orgname}/teams + + - BASIC: + - type: http + - name: basicAuth + - API Key: + - type: apiKey token (QUERY) + - name: tokenAuth + - parameter body: (body) + - parameter orgname: (path) A DagsHub organization name + + - returns: RequestBuilder + */ + open class func createOrgTeamWithRequestBuilder(body: CreateAnnotatorTeam, orgname: String) -> RequestBuilder { + var path = "/admin/orgs/{orgname}/teams" + let orgnamePreEscape = "\(orgname)" + let orgnamePostEscape = orgnamePreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" + path = path.replacingOccurrences(of: "{orgname}", with: orgnamePostEscape, options: .literal, range: nil) + let URLString = SwaggerClientAPI.basePath + path + let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) + let url = URLComponents(string: URLString) + + + let requestBuilder: RequestBuilder.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder() + + return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true) + } +} diff --git a/Swift/SwaggerClient/Classes/Swaggers/APIs/StorageIntegrationsAPI.swift b/Swift/SwaggerClient/Classes/Swaggers/APIs/StorageIntegrationsAPI.swift index 3a4db53..b8c3dd9 100644 --- a/Swift/SwaggerClient/Classes/Swaggers/APIs/StorageIntegrationsAPI.swift +++ b/Swift/SwaggerClient/Classes/Swaggers/APIs/StorageIntegrationsAPI.swift @@ -28,11 +28,12 @@ open class StorageIntegrationsAPI { - parameter path: (path) path of a folder in the repository - parameter includeSize: (query) (optional, default to false) - parameter limit: (query) Maximum amount of items to return (optional, default to 100) - - parameter fromToken: (query) Token, from which to continue iteration (optional) + - parameter paging: (query) Whether or not paging is enabled (optional, default to false) + - parameter fromToken: (query) [Only if paging is enabled] token, from which to continue iteration (optional) - parameter completion: completion handler to receive the data and the error objects */ - open class func getBucketContent(owner: String, repo: String, _protocol: ModelProtocol_getBucketContent, bucket: String, path: String, includeSize: Bool? = nil, limit: Int? = nil, fromToken: String? = nil, completion: @escaping ((_ data: Files1?,_ error: Error?) -> Void)) { - getBucketContentWithRequestBuilder(owner: owner, repo: repo, _protocol: _protocol, bucket: bucket, path: path, includeSize: includeSize, limit: limit, fromToken: fromToken).execute { (response, error) -> Void in + open class func getBucketContent(owner: String, repo: String, _protocol: ModelProtocol_getBucketContent, bucket: String, path: String, includeSize: Bool? = nil, limit: Int? = nil, paging: Bool? = nil, fromToken: String? = nil, completion: @escaping ((_ data: Files1?,_ error: Error?) -> Void)) { + getBucketContentWithRequestBuilder(owner: owner, repo: repo, _protocol: _protocol, bucket: bucket, path: path, includeSize: includeSize, limit: limit, paging: paging, fromToken: fromToken).execute { (response, error) -> Void in completion(response?.body, error) } } @@ -67,7 +68,6 @@ open class StorageIntegrationsAPI { "type" : "[file]", "hash" : "79fb7f8632d7e15b3b46a7411d08bcdd" } ], - "limit" : 0, "next_token" : "next_token" }}] - parameter owner: (path) owner of the repository @@ -77,11 +77,12 @@ open class StorageIntegrationsAPI { - parameter path: (path) path of a folder in the repository - parameter includeSize: (query) (optional, default to false) - parameter limit: (query) Maximum amount of items to return (optional, default to 100) - - parameter fromToken: (query) Token, from which to continue iteration (optional) + - parameter paging: (query) Whether or not paging is enabled (optional, default to false) + - parameter fromToken: (query) [Only if paging is enabled] token, from which to continue iteration (optional) - returns: RequestBuilder */ - open class func getBucketContentWithRequestBuilder(owner: String, repo: String, _protocol: ModelProtocol_getBucketContent, bucket: String, path: String, includeSize: Bool? = nil, limit: Int? = nil, fromToken: String? = nil) -> RequestBuilder { + open class func getBucketContentWithRequestBuilder(owner: String, repo: String, _protocol: ModelProtocol_getBucketContent, bucket: String, path: String, includeSize: Bool? = nil, limit: Int? = nil, paging: Bool? = nil, fromToken: String? = nil) -> RequestBuilder { var path = "/repos/{owner}/{repo}/storage/content/{protocol}/{bucket}/{path}" let ownerPreEscape = "\(owner)" let ownerPostEscape = ownerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" @@ -104,6 +105,7 @@ open class StorageIntegrationsAPI { url?.queryItems = APIHelper.mapValuesToQueryItems([ "include_size": includeSize, "limit": limit?.encodeToJSON(), + "paging": paging, "from_token": fromToken ]) diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/CreateAnnotatorTeam.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/CreateAnnotatorTeam.swift new file mode 100644 index 0000000..43cb7b1 --- /dev/null +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/CreateAnnotatorTeam.swift @@ -0,0 +1,46 @@ +// +// CreateAnnotatorTeam.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + + +public struct CreateAnnotatorTeam: Codable { + + public enum TeamType: String, Codable { + case normal = "normal" + case annotator = "annotator" + } + public enum Permission: String, Codable { + case read = "read" + case write = "write" + case admin = "admin" + } + /** Team name */ + public var name: String + /** Team description */ + public var _description: String? + /** Type of team - normal teams have repository access, annotator teams only have annotation project access */ + public var teamType: TeamType? + /** Repository permission level (required for normal teams, ignored for annotator teams) */ + public var permission: Permission? + + public init(name: String, _description: String? = nil, teamType: TeamType? = nil, permission: Permission? = nil) { + self.name = name + self._description = _description + self.teamType = teamType + self.permission = permission + } + + public enum CodingKeys: String, CodingKey { + case name + case _description = "description" + case teamType = "team_type" + case permission + } + +} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/Files1.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/Files1.swift index d452196..43db659 100644 --- a/Swift/SwaggerClient/Classes/Swaggers/Models/Files1.swift +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/Files1.swift @@ -12,18 +12,16 @@ import Foundation public struct Files1: Codable { public var entries: [File]? - public var limit: Int? + /** Next token to continue pagination from */ public var nextToken: String? - public init(entries: [File]? = nil, limit: Int? = nil, nextToken: String? = nil) { + public init(entries: [File]? = nil, nextToken: String? = nil) { self.entries = entries - self.limit = limit self.nextToken = nextToken } public enum CodingKeys: String, CodingKey { case entries - case limit case nextToken = "next_token" } diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/GrantLabelStudioAccess.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/GrantLabelStudioAccess.swift new file mode 100644 index 0000000..98c3f66 --- /dev/null +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/GrantLabelStudioAccess.swift @@ -0,0 +1,33 @@ +// +// GrantLabelStudioAccess.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + + +public struct GrantLabelStudioAccess: Codable { + + public enum AccessLevel: String, Codable { + case annotator = "annotator" + case _none = "none" + } + /** Project ID, -1 for wildcard access to all projects */ + public var projectId: Int64 + /** Access level to grant */ + public var accessLevel: AccessLevel? + + public init(projectId: Int64, accessLevel: AccessLevel? = nil) { + self.projectId = projectId + self.accessLevel = accessLevel + } + + public enum CodingKeys: String, CodingKey { + case projectId = "project_id" + case accessLevel = "access_level" + } + +} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/InlineResponse200.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/InlineResponse200.swift new file mode 100644 index 0000000..5e68aa2 --- /dev/null +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/InlineResponse200.swift @@ -0,0 +1,34 @@ +// +// InlineResponse200.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + + +public struct InlineResponse200: Codable { + + public enum AccessLevel: String, Codable { + case _none = "none" + case annotator = "annotator" + } + public var userId: Int64? + public var projectId: Int64? + public var accessLevel: AccessLevel? + + public init(userId: Int64? = nil, projectId: Int64? = nil, accessLevel: AccessLevel? = nil) { + self.userId = userId + self.projectId = projectId + self.accessLevel = accessLevel + } + + public enum CodingKeys: String, CodingKey { + case userId = "user_id" + case projectId = "project_id" + case accessLevel = "access_level" + } + +} diff --git a/Swift/SwaggerClient/Classes/Swaggers/Models/LabelStudioProjectAccess.swift b/Swift/SwaggerClient/Classes/Swaggers/Models/LabelStudioProjectAccess.swift new file mode 100644 index 0000000..71e9ff7 --- /dev/null +++ b/Swift/SwaggerClient/Classes/Swaggers/Models/LabelStudioProjectAccess.swift @@ -0,0 +1,52 @@ +// +// LabelStudioProjectAccess.swift +// +// Generated by swagger-codegen +// https://github.com/swagger-api/swagger-codegen +// + +import Foundation + + + +public struct LabelStudioProjectAccess: Codable { + + public enum AccessLevel: String, Codable { + case _none = "none" + case annotator = "annotator" + } + public var _id: Int64? + public var repoId: Int64? + /** Project ID, -1 means wildcard access to all projects */ + public var projectId: Int64? + /** User ID (present for user access entries) */ + public var userId: Int64? + /** Team ID (present for team access entries) */ + public var teamId: Int64? + public var accessLevel: AccessLevel? + public var createdUnix: Int64? + public var user: User? + + public init(_id: Int64? = nil, repoId: Int64? = nil, projectId: Int64? = nil, userId: Int64? = nil, teamId: Int64? = nil, accessLevel: AccessLevel? = nil, createdUnix: Int64? = nil, user: User? = nil) { + self._id = _id + self.repoId = repoId + self.projectId = projectId + self.userId = userId + self.teamId = teamId + self.accessLevel = accessLevel + self.createdUnix = createdUnix + self.user = user + } + + public enum CodingKeys: String, CodingKey { + case _id = "id" + case repoId = "repo_id" + case projectId = "project_id" + case userId = "user_id" + case teamId = "team_id" + case accessLevel = "access_level" + case createdUnix = "created_unix" + case user + } + +} diff --git a/TypeScript/api.ts b/TypeScript/api.ts index c379c91..969f379 100644 --- a/TypeScript/api.ts +++ b/TypeScript/api.ts @@ -4,18 +4,20 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */export * from './apis/branches-api'; + */export * from './apis/annotations-api'; +export * from './apis/branches-api'; export * from './apis/collaborators-api'; export * from './apis/commits-api'; export * from './apis/content-api'; export * from './apis/experiments-api'; export * from './apis/issues-api'; +export * from './apis/organizations-api'; export * from './apis/releases-api'; export * from './apis/repository-api'; export * from './apis/storage-integrations-api'; diff --git a/TypeScript/apis/annotations-api.ts b/TypeScript/apis/annotations-api.ts new file mode 100644 index 0000000..a5614e3 --- /dev/null +++ b/TypeScript/apis/annotations-api.ts @@ -0,0 +1,934 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { GrantLabelStudioAccess } from '../models'; +import { InlineResponse200 } from '../models'; +import { LabelStudioProjectAccess } from '../models'; +/** + * AnnotationsApi - axios parameter creator + * @export + */ +export const AnnotationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get the access level for a specific team and project (or all projects) + * @summary Get team access level for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLabelStudioTeamAccess: async (owner: string, repo: string, teamid: number, projectId?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError('owner','Required parameter owner was null or undefined when calling getLabelStudioTeamAccess.'); + } + // verify required parameter 'repo' is not null or undefined + if (repo === null || repo === undefined) { + throw new RequiredError('repo','Required parameter repo was null or undefined when calling getLabelStudioTeamAccess.'); + } + // verify required parameter 'teamid' is not null or undefined + if (teamid === null || teamid === undefined) { + throw new RequiredError('teamid','Required parameter teamid was null or undefined when calling getLabelStudioTeamAccess.'); + } + const localVarPath = `/repos/{owner}/{repo}/annotations/access/teams/{teamid}` + .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) + .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) + .replace(`{${"teamid"}}`, encodeURIComponent(String(teamid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + + // authentication tokenAuth required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("token") + : await configuration.apiKey; + localVarQueryParameter["token"] = localVarApiKeyValue; + } + + if (projectId !== undefined) { + localVarQueryParameter['project_id'] = projectId; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Get the access level for a specific user and project (or all projects) + * @summary Get user access level for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getLabelStudioUserAccess: async (owner: string, repo: string, userid: number, projectId?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError('owner','Required parameter owner was null or undefined when calling getLabelStudioUserAccess.'); + } + // verify required parameter 'repo' is not null or undefined + if (repo === null || repo === undefined) { + throw new RequiredError('repo','Required parameter repo was null or undefined when calling getLabelStudioUserAccess.'); + } + // verify required parameter 'userid' is not null or undefined + if (userid === null || userid === undefined) { + throw new RequiredError('userid','Required parameter userid was null or undefined when calling getLabelStudioUserAccess.'); + } + const localVarPath = `/repos/{owner}/{repo}/annotations/access/users/{userid}` + .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) + .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) + .replace(`{${"userid"}}`, encodeURIComponent(String(userid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + + // authentication tokenAuth required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("token") + : await configuration.apiKey; + localVarQueryParameter["token"] = localVarApiKeyValue; + } + + if (projectId !== undefined) { + localVarQueryParameter['project_id'] = projectId; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * @summary Grant team access to annotation projects + * @param {GrantLabelStudioAccess} body + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + grantLabelStudioTeamAccess: async (body: GrantLabelStudioAccess, owner: string, repo: string, teamid: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling grantLabelStudioTeamAccess.'); + } + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError('owner','Required parameter owner was null or undefined when calling grantLabelStudioTeamAccess.'); + } + // verify required parameter 'repo' is not null or undefined + if (repo === null || repo === undefined) { + throw new RequiredError('repo','Required parameter repo was null or undefined when calling grantLabelStudioTeamAccess.'); + } + // verify required parameter 'teamid' is not null or undefined + if (teamid === null || teamid === undefined) { + throw new RequiredError('teamid','Required parameter teamid was null or undefined when calling grantLabelStudioTeamAccess.'); + } + const localVarPath = `/repos/{owner}/{repo}/annotations/access/teams/{teamid}` + .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) + .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) + .replace(`{${"teamid"}}`, encodeURIComponent(String(teamid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + + // authentication tokenAuth required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("token") + : await configuration.apiKey; + localVarQueryParameter["token"] = localVarApiKeyValue; + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * @summary Grant user access to annotation projects + * @param {GrantLabelStudioAccess} body + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + grantLabelStudioUserAccess: async (body: GrantLabelStudioAccess, owner: string, repo: string, userid: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling grantLabelStudioUserAccess.'); + } + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError('owner','Required parameter owner was null or undefined when calling grantLabelStudioUserAccess.'); + } + // verify required parameter 'repo' is not null or undefined + if (repo === null || repo === undefined) { + throw new RequiredError('repo','Required parameter repo was null or undefined when calling grantLabelStudioUserAccess.'); + } + // verify required parameter 'userid' is not null or undefined + if (userid === null || userid === undefined) { + throw new RequiredError('userid','Required parameter userid was null or undefined when calling grantLabelStudioUserAccess.'); + } + const localVarPath = `/repos/{owner}/{repo}/annotations/access/users/{userid}` + .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) + .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) + .replace(`{${"userid"}}`, encodeURIComponent(String(userid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'PUT', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + + // authentication tokenAuth required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("token") + : await configuration.apiKey; + localVarQueryParameter["token"] = localVarApiKeyValue; + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * @summary List team access entries for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listLabelStudioTeamAccess: async (owner: string, repo: string, projectId?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError('owner','Required parameter owner was null or undefined when calling listLabelStudioTeamAccess.'); + } + // verify required parameter 'repo' is not null or undefined + if (repo === null || repo === undefined) { + throw new RequiredError('repo','Required parameter repo was null or undefined when calling listLabelStudioTeamAccess.'); + } + const localVarPath = `/repos/{owner}/{repo}/annotations/access/teams` + .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) + .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + + // authentication tokenAuth required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("token") + : await configuration.apiKey; + localVarQueryParameter["token"] = localVarApiKeyValue; + } + + if (projectId !== undefined) { + localVarQueryParameter['project_id'] = projectId; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Get a list of users with access to Label Studio annotation projects in the repository + * @summary List user access entries for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listLabelStudioUserAccess: async (owner: string, repo: string, projectId?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError('owner','Required parameter owner was null or undefined when calling listLabelStudioUserAccess.'); + } + // verify required parameter 'repo' is not null or undefined + if (repo === null || repo === undefined) { + throw new RequiredError('repo','Required parameter repo was null or undefined when calling listLabelStudioUserAccess.'); + } + const localVarPath = `/repos/{owner}/{repo}/annotations/access/users` + .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) + .replace(`{${"repo"}}`, encodeURIComponent(String(repo))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + + // authentication tokenAuth required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("token") + : await configuration.apiKey; + localVarQueryParameter["token"] = localVarApiKeyValue; + } + + if (projectId !== undefined) { + localVarQueryParameter['project_id'] = projectId; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Revoke a team's access to Label Studio annotation projects + * @summary Revoke team access to annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + revokeLabelStudioTeamAccess: async (owner: string, repo: string, teamid: number, projectId?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError('owner','Required parameter owner was null or undefined when calling revokeLabelStudioTeamAccess.'); + } + // verify required parameter 'repo' is not null or undefined + if (repo === null || repo === undefined) { + throw new RequiredError('repo','Required parameter repo was null or undefined when calling revokeLabelStudioTeamAccess.'); + } + // verify required parameter 'teamid' is not null or undefined + if (teamid === null || teamid === undefined) { + throw new RequiredError('teamid','Required parameter teamid was null or undefined when calling revokeLabelStudioTeamAccess.'); + } + const localVarPath = `/repos/{owner}/{repo}/annotations/access/teams/{teamid}` + .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) + .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) + .replace(`{${"teamid"}}`, encodeURIComponent(String(teamid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + + // authentication tokenAuth required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("token") + : await configuration.apiKey; + localVarQueryParameter["token"] = localVarApiKeyValue; + } + + if (projectId !== undefined) { + localVarQueryParameter['project_id'] = projectId; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + /** + * Revoke a user's access to Label Studio annotation projects + * @summary Revoke user access to annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + revokeLabelStudioUserAccess: async (owner: string, repo: string, userid: number, projectId?: number, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'owner' is not null or undefined + if (owner === null || owner === undefined) { + throw new RequiredError('owner','Required parameter owner was null or undefined when calling revokeLabelStudioUserAccess.'); + } + // verify required parameter 'repo' is not null or undefined + if (repo === null || repo === undefined) { + throw new RequiredError('repo','Required parameter repo was null or undefined when calling revokeLabelStudioUserAccess.'); + } + // verify required parameter 'userid' is not null or undefined + if (userid === null || userid === undefined) { + throw new RequiredError('userid','Required parameter userid was null or undefined when calling revokeLabelStudioUserAccess.'); + } + const localVarPath = `/repos/{owner}/{repo}/annotations/access/users/{userid}` + .replace(`{${"owner"}}`, encodeURIComponent(String(owner))) + .replace(`{${"repo"}}`, encodeURIComponent(String(repo))) + .replace(`{${"userid"}}`, encodeURIComponent(String(userid))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + + // authentication tokenAuth required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("token") + : await configuration.apiKey; + localVarQueryParameter["token"] = localVarApiKeyValue; + } + + if (projectId !== undefined) { + localVarQueryParameter['project_id'] = projectId; + } + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AnnotationsApi - functional programming interface + * @export + */ +export const AnnotationsApiFp = function(configuration?: Configuration) { + return { + /** + * Get the access level for a specific team and project (or all projects) + * @summary Get team access level for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLabelStudioTeamAccess(owner: string, repo: string, teamid: number, projectId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await AnnotationsApiAxiosParamCreator(configuration).getLabelStudioTeamAccess(owner, repo, teamid, projectId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Get the access level for a specific user and project (or all projects) + * @summary Get user access level for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLabelStudioUserAccess(owner: string, repo: string, userid: number, projectId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await AnnotationsApiAxiosParamCreator(configuration).getLabelStudioUserAccess(owner, repo, userid, projectId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * @summary Grant team access to annotation projects + * @param {GrantLabelStudioAccess} body + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async grantLabelStudioTeamAccess(body: GrantLabelStudioAccess, owner: string, repo: string, teamid: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await AnnotationsApiAxiosParamCreator(configuration).grantLabelStudioTeamAccess(body, owner, repo, teamid, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * @summary Grant user access to annotation projects + * @param {GrantLabelStudioAccess} body + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async grantLabelStudioUserAccess(body: GrantLabelStudioAccess, owner: string, repo: string, userid: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await AnnotationsApiAxiosParamCreator(configuration).grantLabelStudioUserAccess(body, owner, repo, userid, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * @summary List team access entries for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listLabelStudioTeamAccess(owner: string, repo: string, projectId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>> { + const localVarAxiosArgs = await AnnotationsApiAxiosParamCreator(configuration).listLabelStudioTeamAccess(owner, repo, projectId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Get a list of users with access to Label Studio annotation projects in the repository + * @summary List user access entries for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listLabelStudioUserAccess(owner: string, repo: string, projectId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>>> { + const localVarAxiosArgs = await AnnotationsApiAxiosParamCreator(configuration).listLabelStudioUserAccess(owner, repo, projectId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Revoke a team's access to Label Studio annotation projects + * @summary Revoke team access to annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async revokeLabelStudioTeamAccess(owner: string, repo: string, teamid: number, projectId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await AnnotationsApiAxiosParamCreator(configuration).revokeLabelStudioTeamAccess(owner, repo, teamid, projectId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + /** + * Revoke a user's access to Label Studio annotation projects + * @summary Revoke user access to annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async revokeLabelStudioUserAccess(owner: string, repo: string, userid: number, projectId?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await AnnotationsApiAxiosParamCreator(configuration).revokeLabelStudioUserAccess(owner, repo, userid, projectId, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * AnnotationsApi - factory interface + * @export + */ +export const AnnotationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * Get the access level for a specific team and project (or all projects) + * @summary Get team access level for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLabelStudioTeamAccess(owner: string, repo: string, teamid: number, projectId?: number, options?: AxiosRequestConfig): Promise> { + return AnnotationsApiFp(configuration).getLabelStudioTeamAccess(owner, repo, teamid, projectId, options).then((request) => request(axios, basePath)); + }, + /** + * Get the access level for a specific user and project (or all projects) + * @summary Get user access level for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getLabelStudioUserAccess(owner: string, repo: string, userid: number, projectId?: number, options?: AxiosRequestConfig): Promise> { + return AnnotationsApiFp(configuration).getLabelStudioUserAccess(owner, repo, userid, projectId, options).then((request) => request(axios, basePath)); + }, + /** + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * @summary Grant team access to annotation projects + * @param {GrantLabelStudioAccess} body + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async grantLabelStudioTeamAccess(body: GrantLabelStudioAccess, owner: string, repo: string, teamid: number, options?: AxiosRequestConfig): Promise> { + return AnnotationsApiFp(configuration).grantLabelStudioTeamAccess(body, owner, repo, teamid, options).then((request) => request(axios, basePath)); + }, + /** + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * @summary Grant user access to annotation projects + * @param {GrantLabelStudioAccess} body + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async grantLabelStudioUserAccess(body: GrantLabelStudioAccess, owner: string, repo: string, userid: number, options?: AxiosRequestConfig): Promise> { + return AnnotationsApiFp(configuration).grantLabelStudioUserAccess(body, owner, repo, userid, options).then((request) => request(axios, basePath)); + }, + /** + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * @summary List team access entries for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listLabelStudioTeamAccess(owner: string, repo: string, projectId?: number, options?: AxiosRequestConfig): Promise>> { + return AnnotationsApiFp(configuration).listLabelStudioTeamAccess(owner, repo, projectId, options).then((request) => request(axios, basePath)); + }, + /** + * Get a list of users with access to Label Studio annotation projects in the repository + * @summary List user access entries for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listLabelStudioUserAccess(owner: string, repo: string, projectId?: number, options?: AxiosRequestConfig): Promise>> { + return AnnotationsApiFp(configuration).listLabelStudioUserAccess(owner, repo, projectId, options).then((request) => request(axios, basePath)); + }, + /** + * Revoke a team's access to Label Studio annotation projects + * @summary Revoke team access to annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async revokeLabelStudioTeamAccess(owner: string, repo: string, teamid: number, projectId?: number, options?: AxiosRequestConfig): Promise> { + return AnnotationsApiFp(configuration).revokeLabelStudioTeamAccess(owner, repo, teamid, projectId, options).then((request) => request(axios, basePath)); + }, + /** + * Revoke a user's access to Label Studio annotation projects + * @summary Revoke user access to annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async revokeLabelStudioUserAccess(owner: string, repo: string, userid: number, projectId?: number, options?: AxiosRequestConfig): Promise> { + return AnnotationsApiFp(configuration).revokeLabelStudioUserAccess(owner, repo, userid, projectId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AnnotationsApi - object-oriented interface + * @export + * @class AnnotationsApi + * @extends {BaseAPI} + */ +export class AnnotationsApi extends BaseAPI { + /** + * Get the access level for a specific team and project (or all projects) + * @summary Get team access level for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AnnotationsApi + */ + public async getLabelStudioTeamAccess(owner: string, repo: string, teamid: number, projectId?: number, options?: AxiosRequestConfig) : Promise> { + return AnnotationsApiFp(this.configuration).getLabelStudioTeamAccess(owner, repo, teamid, projectId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Get the access level for a specific user and project (or all projects) + * @summary Get user access level for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AnnotationsApi + */ + public async getLabelStudioUserAccess(owner: string, repo: string, userid: number, projectId?: number, options?: AxiosRequestConfig) : Promise> { + return AnnotationsApiFp(this.configuration).getLabelStudioUserAccess(owner, repo, userid, projectId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Grant a team access to specific Label Studio annotation projects (organization repositories only) + * @summary Grant team access to annotation projects + * @param {GrantLabelStudioAccess} body + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AnnotationsApi + */ + public async grantLabelStudioTeamAccess(body: GrantLabelStudioAccess, owner: string, repo: string, teamid: number, options?: AxiosRequestConfig) : Promise> { + return AnnotationsApiFp(this.configuration).grantLabelStudioTeamAccess(body, owner, repo, teamid, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Grant a user access to specific Label Studio annotation projects. User must be an organization member if the repo is owned by an organization. + * @summary Grant user access to annotation projects + * @param {GrantLabelStudioAccess} body + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AnnotationsApi + */ + public async grantLabelStudioUserAccess(body: GrantLabelStudioAccess, owner: string, repo: string, userid: number, options?: AxiosRequestConfig) : Promise> { + return AnnotationsApiFp(this.configuration).grantLabelStudioUserAccess(body, owner, repo, userid, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Get a list of teams with access to Label Studio annotation projects in the repository (organization repositories only) + * @summary List team access entries for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AnnotationsApi + */ + public async listLabelStudioTeamAccess(owner: string, repo: string, projectId?: number, options?: AxiosRequestConfig) : Promise>> { + return AnnotationsApiFp(this.configuration).listLabelStudioTeamAccess(owner, repo, projectId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Get a list of users with access to Label Studio annotation projects in the repository + * @summary List user access entries for annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AnnotationsApi + */ + public async listLabelStudioUserAccess(owner: string, repo: string, projectId?: number, options?: AxiosRequestConfig) : Promise>> { + return AnnotationsApiFp(this.configuration).listLabelStudioUserAccess(owner, repo, projectId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Revoke a team's access to Label Studio annotation projects + * @summary Revoke team access to annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} teamid Team ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AnnotationsApi + */ + public async revokeLabelStudioTeamAccess(owner: string, repo: string, teamid: number, projectId?: number, options?: AxiosRequestConfig) : Promise> { + return AnnotationsApiFp(this.configuration).revokeLabelStudioTeamAccess(owner, repo, teamid, projectId, options).then((request) => request(this.axios, this.basePath)); + } + /** + * Revoke a user's access to Label Studio annotation projects + * @summary Revoke user access to annotation projects + * @param {string} owner owner of the repository + * @param {string} repo name of the repository + * @param {number} userid User ID + * @param {number} [projectId] Label Studio project ID to filter by. If not specified, returns access for all projects. Use -1 for wildcard access. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof AnnotationsApi + */ + public async revokeLabelStudioUserAccess(owner: string, repo: string, userid: number, projectId?: number, options?: AxiosRequestConfig) : Promise> { + return AnnotationsApiFp(this.configuration).revokeLabelStudioUserAccess(owner, repo, userid, projectId, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/TypeScript/apis/branches-api.ts b/TypeScript/apis/branches-api.ts index c978c34..d928ed7 100644 --- a/TypeScript/apis/branches-api.ts +++ b/TypeScript/apis/branches-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/apis/collaborators-api.ts b/TypeScript/apis/collaborators-api.ts index a98af08..8a8b30d 100644 --- a/TypeScript/apis/collaborators-api.ts +++ b/TypeScript/apis/collaborators-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/apis/commits-api.ts b/TypeScript/apis/commits-api.ts index fc1fb4f..729f41b 100644 --- a/TypeScript/apis/commits-api.ts +++ b/TypeScript/apis/commits-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/apis/content-api.ts b/TypeScript/apis/content-api.ts index 8b6e61c..c1389c8 100644 --- a/TypeScript/apis/content-api.ts +++ b/TypeScript/apis/content-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/apis/experiments-api.ts b/TypeScript/apis/experiments-api.ts index 491cf4b..b40fe7c 100644 --- a/TypeScript/apis/experiments-api.ts +++ b/TypeScript/apis/experiments-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/apis/issues-api.ts b/TypeScript/apis/issues-api.ts index 0d3d56f..14e6f20 100644 --- a/TypeScript/apis/issues-api.ts +++ b/TypeScript/apis/issues-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/apis/organizations-api.ts b/TypeScript/apis/organizations-api.ts new file mode 100644 index 0000000..bea220b --- /dev/null +++ b/TypeScript/apis/organizations-api.ts @@ -0,0 +1,151 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'; +import { Configuration } from '../configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; +import { CreateAnnotatorTeam } from '../models'; +/** + * OrganizationsApi - axios parameter creator + * @export + */ +export const OrganizationsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * @summary Create an organization team + * @param {CreateAnnotatorTeam} body + * @param {string} orgname A DagsHub organization name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createOrgTeam: async (body: CreateAnnotatorTeam, orgname: string, options: AxiosRequestConfig = {}): Promise => { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError('body','Required parameter body was null or undefined when calling createOrgTeam.'); + } + // verify required parameter 'orgname' is not null or undefined + if (orgname === null || orgname === undefined) { + throw new RequiredError('orgname','Required parameter orgname was null or undefined when calling createOrgTeam.'); + } + const localVarPath = `/admin/orgs/{orgname}/teams` + .replace(`{${"orgname"}}`, encodeURIComponent(String(orgname))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, 'https://example.com'); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication basicAuth required + + // authentication tokenAuth required + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey("token") + : await configuration.apiKey; + localVarQueryParameter["token"] = localVarApiKeyValue; + } + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + const query = new URLSearchParams(localVarUrlObj.search); + for (const key in localVarQueryParameter) { + query.set(key, localVarQueryParameter[key]); + } + for (const key in options.params) { + query.set(key, options.params[key]); + } + localVarUrlObj.search = (new URLSearchParams(query)).toString(); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; + localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); + + return { + url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * OrganizationsApi - functional programming interface + * @export + */ +export const OrganizationsApiFp = function(configuration?: Configuration) { + return { + /** + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * @summary Create an organization team + * @param {CreateAnnotatorTeam} body + * @param {string} orgname A DagsHub organization name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createOrgTeam(body: CreateAnnotatorTeam, orgname: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await OrganizationsApiAxiosParamCreator(configuration).createOrgTeam(body, orgname, options); + return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { + const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; + return axios.request(axiosRequestArgs); + }; + }, + } +}; + +/** + * OrganizationsApi - factory interface + * @export + */ +export const OrganizationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + return { + /** + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * @summary Create an organization team + * @param {CreateAnnotatorTeam} body + * @param {string} orgname A DagsHub organization name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createOrgTeam(body: CreateAnnotatorTeam, orgname: string, options?: AxiosRequestConfig): Promise> { + return OrganizationsApiFp(configuration).createOrgTeam(body, orgname, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * OrganizationsApi - object-oriented interface + * @export + * @class OrganizationsApi + * @extends {BaseAPI} + */ +export class OrganizationsApi extends BaseAPI { + /** + * Create a new team in an organization. Use team_type \"annotator\" to create an annotator team with access only to annotation projects. + * @summary Create an organization team + * @param {CreateAnnotatorTeam} body + * @param {string} orgname A DagsHub organization name + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OrganizationsApi + */ + public async createOrgTeam(body: CreateAnnotatorTeam, orgname: string, options?: AxiosRequestConfig) : Promise> { + return OrganizationsApiFp(this.configuration).createOrgTeam(body, orgname, options).then((request) => request(this.axios, this.basePath)); + } +} diff --git a/TypeScript/apis/releases-api.ts b/TypeScript/apis/releases-api.ts index aa43b28..c86ccb2 100644 --- a/TypeScript/apis/releases-api.ts +++ b/TypeScript/apis/releases-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/apis/repository-api.ts b/TypeScript/apis/repository-api.ts index 04f22d2..9256dc1 100644 --- a/TypeScript/apis/repository-api.ts +++ b/TypeScript/apis/repository-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/apis/storage-integrations-api.ts b/TypeScript/apis/storage-integrations-api.ts index 4009ee5..e5fe52b 100644 --- a/TypeScript/apis/storage-integrations-api.ts +++ b/TypeScript/apis/storage-integrations-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -34,11 +34,12 @@ export const StorageIntegrationsApiAxiosParamCreator = function (configuration?: * @param {string} path path of a folder in the repository * @param {boolean} [includeSize] * @param {number} [limit] Maximum amount of items to return - * @param {string} [fromToken] Token, from which to continue iteration + * @param {boolean} [paging] Whether or not paging is enabled + * @param {string} [fromToken] [Only if paging is enabled] token, from which to continue iteration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getBucketContent: async (owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, fromToken?: string, options: AxiosRequestConfig = {}): Promise => { + getBucketContent: async (owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, paging?: boolean, fromToken?: string, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'owner' is not null or undefined if (owner === null || owner === undefined) { throw new RequiredError('owner','Required parameter owner was null or undefined when calling getBucketContent.'); @@ -93,6 +94,10 @@ export const StorageIntegrationsApiAxiosParamCreator = function (configuration?: localVarQueryParameter['limit'] = limit; } + if (paging !== undefined) { + localVarQueryParameter['paging'] = paging; + } + if (fromToken !== undefined) { localVarQueryParameter['from_token'] = fromToken; } @@ -262,12 +267,13 @@ export const StorageIntegrationsApiFp = function(configuration?: Configuration) * @param {string} path path of a folder in the repository * @param {boolean} [includeSize] * @param {number} [limit] Maximum amount of items to return - * @param {string} [fromToken] Token, from which to continue iteration + * @param {boolean} [paging] Whether or not paging is enabled + * @param {string} [fromToken] [Only if paging is enabled] token, from which to continue iteration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getBucketContent(owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, fromToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await StorageIntegrationsApiAxiosParamCreator(configuration).getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, options); + async getBucketContent(owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, paging?: boolean, fromToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await StorageIntegrationsApiAxiosParamCreator(configuration).getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken, options); return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; return axios.request(axiosRequestArgs); @@ -325,12 +331,13 @@ export const StorageIntegrationsApiFactory = function (configuration?: Configura * @param {string} path path of a folder in the repository * @param {boolean} [includeSize] * @param {number} [limit] Maximum amount of items to return - * @param {string} [fromToken] Token, from which to continue iteration + * @param {boolean} [paging] Whether or not paging is enabled + * @param {string} [fromToken] [Only if paging is enabled] token, from which to continue iteration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getBucketContent(owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, fromToken?: string, options?: AxiosRequestConfig): Promise> { - return StorageIntegrationsApiFp(configuration).getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, options).then((request) => request(axios, basePath)); + async getBucketContent(owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, paging?: boolean, fromToken?: string, options?: AxiosRequestConfig): Promise> { + return StorageIntegrationsApiFp(configuration).getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken, options).then((request) => request(axios, basePath)); }, /** * @@ -377,13 +384,14 @@ export class StorageIntegrationsApi extends BaseAPI { * @param {string} path path of a folder in the repository * @param {boolean} [includeSize] * @param {number} [limit] Maximum amount of items to return - * @param {string} [fromToken] Token, from which to continue iteration + * @param {boolean} [paging] Whether or not paging is enabled + * @param {string} [fromToken] [Only if paging is enabled] token, from which to continue iteration * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof StorageIntegrationsApi */ - public async getBucketContent(owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, fromToken?: string, options?: AxiosRequestConfig) : Promise> { - return StorageIntegrationsApiFp(this.configuration).getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, fromToken, options).then((request) => request(this.axios, this.basePath)); + public async getBucketContent(owner: string, repo: string, protocol: string, bucket: string, path: string, includeSize?: boolean, limit?: number, paging?: boolean, fromToken?: string, options?: AxiosRequestConfig) : Promise> { + return StorageIntegrationsApiFp(this.configuration).getBucketContent(owner, repo, protocol, bucket, path, includeSize, limit, paging, fromToken, options).then((request) => request(this.axios, this.basePath)); } /** * diff --git a/TypeScript/apis/user-api.ts b/TypeScript/apis/user-api.ts index cbc8d4b..4e26df7 100644 --- a/TypeScript/apis/user-api.ts +++ b/TypeScript/apis/user-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/apis/webhooks-api.ts b/TypeScript/apis/webhooks-api.ts index 4636fff..03d1220 100644 --- a/TypeScript/apis/webhooks-api.ts +++ b/TypeScript/apis/webhooks-api.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/base.ts b/TypeScript/base.ts index 6222503..b286e8c 100644 --- a/TypeScript/base.ts +++ b/TypeScript/base.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/configuration.ts b/TypeScript/configuration.ts index d0977e7..c0e943f 100644 --- a/TypeScript/configuration.ts +++ b/TypeScript/configuration.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/index.ts b/TypeScript/index.ts index 1163167..432da12 100644 --- a/TypeScript/index.ts +++ b/TypeScript/index.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/assignee.ts b/TypeScript/models/assignee.ts index 324d61e..7874088 100644 --- a/TypeScript/models/assignee.ts +++ b/TypeScript/models/assignee.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/body.ts b/TypeScript/models/body.ts index 4a95b87..88f94a4 100644 --- a/TypeScript/models/body.ts +++ b/TypeScript/models/body.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/closed.ts b/TypeScript/models/closed.ts index 38b4926..25e3007 100644 --- a/TypeScript/models/closed.ts +++ b/TypeScript/models/closed.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/collaborators-collaborator-body.ts b/TypeScript/models/collaborators-collaborator-body.ts index 3bb39a3..4004912 100644 --- a/TypeScript/models/collaborators-collaborator-body.ts +++ b/TypeScript/models/collaborators-collaborator-body.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/create-annotator-team.ts b/TypeScript/models/create-annotator-team.ts new file mode 100644 index 0000000..f17257f --- /dev/null +++ b/TypeScript/models/create-annotator-team.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @interface CreateAnnotatorTeam + */ +export interface CreateAnnotatorTeam { + /** + * Team name + * @type {string} + * @memberof CreateAnnotatorTeam + */ + name: string; + /** + * Team description + * @type {string} + * @memberof CreateAnnotatorTeam + */ + description?: string; + /** + * Type of team - normal teams have repository access, annotator teams only have annotation project access + * @type {string} + * @memberof CreateAnnotatorTeam + */ + teamType?: CreateAnnotatorTeamTeamTypeEnum; + /** + * Repository permission level (required for normal teams, ignored for annotator teams) + * @type {string} + * @memberof CreateAnnotatorTeam + */ + permission?: CreateAnnotatorTeamPermissionEnum; +} + +/** + * @export + * @enum {string} + */ +export enum CreateAnnotatorTeamTeamTypeEnum { + Normal = 'normal', + Annotator = 'annotator' +} +/** + * @export + * @enum {string} + */ +export enum CreateAnnotatorTeamPermissionEnum { + Read = 'read', + Write = 'write', + Admin = 'admin' +} + diff --git a/TypeScript/models/create-repo.ts b/TypeScript/models/create-repo.ts index 07c373f..4b9cb53 100644 --- a/TypeScript/models/create-repo.ts +++ b/TypeScript/models/create-repo.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/edit-experiment-post.ts b/TypeScript/models/edit-experiment-post.ts index 2919b60..5ecb296 100644 --- a/TypeScript/models/edit-experiment-post.ts +++ b/TypeScript/models/edit-experiment-post.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/experiment-keys.ts b/TypeScript/models/experiment-keys.ts index 80c4a22..4714548 100644 --- a/TypeScript/models/experiment-keys.ts +++ b/TypeScript/models/experiment-keys.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/files.ts b/TypeScript/models/files.ts index a117a1c..38340a1 100644 --- a/TypeScript/models/files.ts +++ b/TypeScript/models/files.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/files1.ts b/TypeScript/models/files1.ts index 194839b..8ef9eb0 100644 --- a/TypeScript/models/files1.ts +++ b/TypeScript/models/files1.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -24,13 +24,7 @@ export interface Files1 { */ entries?: Array; /** - * - * @type {number} - * @memberof Files1 - */ - limit?: number; - /** - * + * Next token to continue pagination from * @type {string} * @memberof Files1 */ diff --git a/TypeScript/models/grant-label-studio-access.ts b/TypeScript/models/grant-label-studio-access.ts new file mode 100644 index 0000000..5c70748 --- /dev/null +++ b/TypeScript/models/grant-label-studio-access.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @interface GrantLabelStudioAccess + */ +export interface GrantLabelStudioAccess { + /** + * Project ID, -1 for wildcard access to all projects + * @type {number} + * @memberof GrantLabelStudioAccess + */ + projectId: number; + /** + * Access level to grant + * @type {string} + * @memberof GrantLabelStudioAccess + */ + accessLevel?: GrantLabelStudioAccessAccessLevelEnum; +} + +/** + * @export + * @enum {string} + */ +export enum GrantLabelStudioAccessAccessLevelEnum { + Annotator = 'annotator', + None = 'none' +} + diff --git a/TypeScript/models/hooks-id-body.ts b/TypeScript/models/hooks-id-body.ts index 8f99977..1c4f61d 100644 --- a/TypeScript/models/hooks-id-body.ts +++ b/TypeScript/models/hooks-id-body.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/index.ts b/TypeScript/models/index.ts index 995594e..64ac779 100644 --- a/TypeScript/models/index.ts +++ b/TypeScript/models/index.ts @@ -2,12 +2,15 @@ export * from './assignee'; export * from './body'; export * from './closed'; export * from './collaborators-collaborator-body'; +export * from './create-annotator-team'; export * from './create-repo'; export * from './edit-experiment-post'; export * from './experiment-keys'; export * from './files'; export * from './files1'; +export * from './grant-label-studio-access'; export * from './hooks-id-body'; +export * from './inline-response200'; export * from './integration'; export * from './integration-inner'; export * from './issue'; @@ -15,6 +18,7 @@ export * from './issue-assignee'; export * from './issue-labels'; export * from './issue-milestone'; export * from './issues'; +export * from './label-studio-project-access'; export * from './labels'; export * from './migrate-repo'; export * from './milestone'; diff --git a/TypeScript/models/inline-response200.ts b/TypeScript/models/inline-response200.ts new file mode 100644 index 0000000..e635474 --- /dev/null +++ b/TypeScript/models/inline-response200.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +/** + * + * @export + * @interface InlineResponse200 + */ +export interface InlineResponse200 { + /** + * + * @type {number} + * @memberof InlineResponse200 + */ + userId?: number; + /** + * + * @type {number} + * @memberof InlineResponse200 + */ + projectId?: number; + /** + * + * @type {string} + * @memberof InlineResponse200 + */ + accessLevel?: InlineResponse200AccessLevelEnum; +} + +/** + * @export + * @enum {string} + */ +export enum InlineResponse200AccessLevelEnum { + None = 'none', + Annotator = 'annotator' +} + diff --git a/TypeScript/models/integration-inner.ts b/TypeScript/models/integration-inner.ts index 41b8fae..b369b11 100644 --- a/TypeScript/models/integration-inner.ts +++ b/TypeScript/models/integration-inner.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/integration.ts b/TypeScript/models/integration.ts index 0124573..4b5d333 100644 --- a/TypeScript/models/integration.ts +++ b/TypeScript/models/integration.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/issue-assignee.ts b/TypeScript/models/issue-assignee.ts index 05dffef..bf89e8c 100644 --- a/TypeScript/models/issue-assignee.ts +++ b/TypeScript/models/issue-assignee.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/issue-labels.ts b/TypeScript/models/issue-labels.ts index aaf3f0f..0c36477 100644 --- a/TypeScript/models/issue-labels.ts +++ b/TypeScript/models/issue-labels.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/issue-milestone.ts b/TypeScript/models/issue-milestone.ts index 372f416..b526f59 100644 --- a/TypeScript/models/issue-milestone.ts +++ b/TypeScript/models/issue-milestone.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/issue.ts b/TypeScript/models/issue.ts index 199b459..80d1364 100644 --- a/TypeScript/models/issue.ts +++ b/TypeScript/models/issue.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/issues.ts b/TypeScript/models/issues.ts index 72af66d..168db8e 100644 --- a/TypeScript/models/issues.ts +++ b/TypeScript/models/issues.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/label-studio-project-access.ts b/TypeScript/models/label-studio-project-access.ts new file mode 100644 index 0000000..9e92f91 --- /dev/null +++ b/TypeScript/models/label-studio-project-access.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * DagsHub API + * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. + * + * OpenAPI spec version: 1.0.3 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { User } from './user'; +/** + * + * @export + * @interface LabelStudioProjectAccess + */ +export interface LabelStudioProjectAccess { + /** + * + * @type {number} + * @memberof LabelStudioProjectAccess + */ + id?: number; + /** + * + * @type {number} + * @memberof LabelStudioProjectAccess + */ + repoId?: number; + /** + * Project ID, -1 means wildcard access to all projects + * @type {number} + * @memberof LabelStudioProjectAccess + */ + projectId?: number; + /** + * User ID (present for user access entries) + * @type {number} + * @memberof LabelStudioProjectAccess + */ + userId?: number; + /** + * Team ID (present for team access entries) + * @type {number} + * @memberof LabelStudioProjectAccess + */ + teamId?: number; + /** + * + * @type {string} + * @memberof LabelStudioProjectAccess + */ + accessLevel?: LabelStudioProjectAccessAccessLevelEnum; + /** + * + * @type {number} + * @memberof LabelStudioProjectAccess + */ + createdUnix?: number; + /** + * + * @type {User} + * @memberof LabelStudioProjectAccess + */ + user?: User; +} + +/** + * @export + * @enum {string} + */ +export enum LabelStudioProjectAccessAccessLevelEnum { + None = 'none', + Annotator = 'annotator' +} + diff --git a/TypeScript/models/labels.ts b/TypeScript/models/labels.ts index c3db9d9..d2283c7 100644 --- a/TypeScript/models/labels.ts +++ b/TypeScript/models/labels.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/migrate-repo.ts b/TypeScript/models/migrate-repo.ts index 6423025..3b3a903 100644 --- a/TypeScript/models/migrate-repo.ts +++ b/TypeScript/models/migrate-repo.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/milestone.ts b/TypeScript/models/milestone.ts index 0d75047..14381d9 100644 --- a/TypeScript/models/milestone.ts +++ b/TypeScript/models/milestone.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/model-file.ts b/TypeScript/models/model-file.ts index a8e6b76..ea69915 100644 --- a/TypeScript/models/model-file.ts +++ b/TypeScript/models/model-file.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/patch-issue.ts b/TypeScript/models/patch-issue.ts index d0f4f82..73b4921 100644 --- a/TypeScript/models/patch-issue.ts +++ b/TypeScript/models/patch-issue.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/post-issue.ts b/TypeScript/models/post-issue.ts index 88f2ab3..b0e813e 100644 --- a/TypeScript/models/post-issue.ts +++ b/TypeScript/models/post-issue.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/put-file.ts b/TypeScript/models/put-file.ts index c6fd24b..97d559f 100644 --- a/TypeScript/models/put-file.ts +++ b/TypeScript/models/put-file.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/repo-hooks-body.ts b/TypeScript/models/repo-hooks-body.ts index 6258261..bad5959 100644 --- a/TypeScript/models/repo-hooks-body.ts +++ b/TypeScript/models/repo-hooks-body.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/state.ts b/TypeScript/models/state.ts index 689b3a5..e22538c 100644 --- a/TypeScript/models/state.ts +++ b/TypeScript/models/state.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/title.ts b/TypeScript/models/title.ts index bf87b0e..83bec3a 100644 --- a/TypeScript/models/title.ts +++ b/TypeScript/models/title.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/user.ts b/TypeScript/models/user.ts index 112932e..b059b0b 100644 --- a/TypeScript/models/user.ts +++ b/TypeScript/models/user.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/webhook-config.ts b/TypeScript/models/webhook-config.ts index eb82e33..e1d9390 100644 --- a/TypeScript/models/webhook-config.ts +++ b/TypeScript/models/webhook-config.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/TypeScript/models/webhook-events.ts b/TypeScript/models/webhook-events.ts index cb7e3d0..33b4eda 100644 --- a/TypeScript/models/webhook-events.ts +++ b/TypeScript/models/webhook-events.ts @@ -4,7 +4,7 @@ * DagsHub API * This API provides a way to retrive & interact with data about DagsHub repositories, users, issues, webhooks and more. The API is also used by the [DagsHub Direct Data Access streaming client](https://github.com/DagsHub/client) to stream content from a repository for easier and faster training. * - * OpenAPI spec version: 1.0.2 + * OpenAPI spec version: 1.0.3 * * * NOTE: This class is auto generated by the swagger code generator program.